-
Notifications
You must be signed in to change notification settings - Fork 336
Errors with wrangler build
and @google-cloud/pubsub
#275
Comments
There may be a general problem with Google API's SDK and Webpack: googleapis/google-cloud-node#1821 However, I tried some other alternatives and got similar results. https://github.com/extrabacon/google-oauth-jwt Using this with the following
As far as I can tell this library does not pull in any google SDK code at all. |
Thanks for the report. According to the error, the library relies on Nodejs native modules which are not available on the web, thus webpack failing to bundle them. What is the error using |
The error by adding the require for
|
Is there any way to work around these issues? A polyfill or similar? |
Have you tried with https://webpack.js.org/configuration/node/? |
This is an issue with global apis provided by node vs the workers runtime, not a wrangler issue. For more information please see the Workers reference docs. https://workers.cloudflare.com/docs/reference/ |
Any solution? |
I am trying to build and deploy a wrangler project making use of the
@google-cloud/pubsub
library.https://github.com/googleapis/nodejs-pubsub
In a router template project, if install the package with
npm install @google-cloud/pubsub
and add the following single line of code importing it I get a massive error trace.index.js
Results in the following output. Any recommendations to resolve are much appreciated as my experience with debugging WebPack issues is limited.
The text was updated successfully, but these errors were encountered: