cloud-trace-nodejs icon indicating copy to clipboard operation
cloud-trace-nodejs copied to clipboard

Provided module cannot be loaded

Open dschroe93 opened this issue 4 years ago • 2 comments

When using this lib in my cloud function on nodejs14 it is producing the following issue:

Provided module can't be loaded.
Did you list all required modules in the package.json dependencies?
Detailed stack trace: Error: Cannot find module '/src/plugins/plugin-http.js'
...

Any help is appreciated.

dschroe93 avatar Oct 09 '21 19:10 dschroe93

I guess this issue is caused by esbuild. Don't you support bundling this lib? For cloud functions, a bundler is really important to have a smaller zip size.

dschroe93 avatar Oct 09 '21 20:10 dschroe93

Hi, I'm sorry this is not working with esbuild. Could you provide a test case to reproduce this error?

Or another option to consider is using the OpenTelemetry library instead. I don't know if it supports esbuild but it will be more actively supported going forward.

gkf avatar Oct 26 '21 14:10 gkf

I'm closing this issue out as stale, but please feel free to reopen, especially if you're able to provide some concrete repro steps (e.g. your package.json, how you invoked esbuild, etc.).

punya avatar Aug 29 '22 16:08 punya