Skip to content

using grpc with webpack? #11435

@slootzky

Description

@slootzky

Hey ,
using google's pubsub node client and it depends on grp which depends on node-pre-gyp.
when using webpack (for serverless functions) I get the following runtime error :

package.json does not exist at...

this comes from pre-bindings.js :
if (!existsSync(package_json_path)) { throw new Error("package.json does not exist at " + package_json_path); }

and this because in grpc_extensions.js is using __dirname and then relative path :

var binding_path = binary.find(path.resolve(path.join(__dirname, '../../../package.json')));

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions