-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack & google-cloud #1821
Comments
We haven't been testing against webpack, so I'm quite confident it would be pure luck if all of our dependencies would be compatible. I'm going to play around with it as time allows, but feel free to dig into it and google around for issues if you want to help out. After a quick search, I found this issue which might get you past the JSONStream error: webpack/webpack#2168 If you do dig into this, please keep me updated! |
thanks @stephenplusplus ! that helped get around the !# errorerror: wepback won't parse
source: webpack/webpack#2168 node-forgeerror:
source: digitalbazaar/forge#198 node-pre-gyperror: haven't researched this one yet. here's error text:
|
I'm going to close this issue, since we don't have any plans to support being run through webpack at this time. Please subscribe to #531 and if we end up carving out some time to spend towards this goal, you can follow along. Sorry I can't be of more help at this time. |
thanks @stephenplusplus , though my interests were more on the-server-side--specifically for |
@brandonmp , I believe the node-pre-gyp code would require a change: Seems webpack is enforcing the fact that 0400 is a non-standard way to write an octal number, which I'd classify as a bug, except that maybe node-pre-gyp is assuming it only ever runs in a node environment. |
Here's a webpack loader to get around the octal number issue: |
based on the comments above I assume the only safe way is to exclude this module from bundling using externals webpack option or webpack-node-externals module. |
any news with this issue? trying to use Google's pubsub from Azure functions & Firebase functions so we're using webpack which fails (currently at node-pre-gyp / pre-binding.js in this part : |
I'm seeing the same error when building a React website with Firebase using Gatsby. Webpack is THE bundling standard nowadays, it seems quite odd that the Google Cloud Platform SDK would not be able to work with it... |
I've tried bundling with webpack, rollup, and browserify (all targeting node) and they all have problems with the |
I dont imagine anyone has come up with an answer for this. this bug is making me crazy right now. any work around? |
@dundas did you find a solution? How do use firebase-admin in angular unversal server? |
Took me a while but I finally got it. In Google Cloud Functions you don't need webpack because you don't upload the function artifact with the dependencies, you upload it with It won't help AWS/Azure users, but at least I can finally use GCP resources from GCF... |
@brandonmp @dundas any solutions or workarounds? I've been building an internal content management system with vue + webpack. I am using the firebase libraries for the database. I just want to be able to upload an image to the storage. For simply adding
|
I have added the following to module.exports = {
// ...
externals: [ 'aws-sdk', /@google-cloud/ ]
} seems to do the trick. |
Environment details
Steps to reproduce
I'm using a
webpack
setup to build anodejs
project, the dependencies of which includegoogle-cloud
Webpack
sort of loses its mind w/google-cloud
, though, so hoping someone has some insight on how to fix.The first error, ironically, appeared to be a deeply nested
aws-sdk
dependency, b/c I guessaws-sdk
doesn't play nicely w/ webpack. I was able to fix that by including a pre-packaged AWS in mywebpack-config.js
, which is here:Now, however, the problem lies with the
JSONStream
dependency. The file apparently includes a#
character at the top of itsindex.js
, and that's breaking the build process.Here's the error:
I'd normally call this a
JSONStream
issue and file it there, butgoogle-cloud
is throwing warnings everywhere (below) as well, so I assume there's some overarching issue w/ webpack.The text was updated successfully, but these errors were encountered: