-
Notifications
You must be signed in to change notification settings - Fork 39
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
Can't resolve 'elastic-apm-node' #189
Comments
@aniketbiprojit Sorry about the delay in responding! As you have found the usage of You say you are using Next.js. That often means that a bundler is being used to produce a single .js file (or set of .js files) that are being run, instead of using the tree of files under Can you show the actual .js code that is doing that Are you getting that If this is in a bundle, I'd love to see that bundle file. It may be that you cannot share the whole thing, if it has proprietary code in it, however. |
Hi. I kind of gave up on the package and wrote my own formatter for the same. So the error was at compile time (dev and build processes). Never reached runtime. |
Also when I installed |
Great library, but this is making a lot of noise. I am using webpack and pnp as well.
This was taken from the bundle .js file:
I see it being requried and throwing an error. It never loads, but this "silent" code block is not so silent. Bundlers are going to listen for these errors. This does not appear to be standard behaviour for the npm/node ecosystem. I haven't seen warnings from other packages during the bundling process. My guess is that you should not try to load it and instead determine if it is there by checking first. Hopefully this info helps. I'm thinking of gutting this library and writing my own too, although I'd rather use this and support official Elastic stuff if this could be fixed. |
⚠ ./node_modules/.pnpm/@elastic[email protected]/node_modules/@elastic/ecs-winston-format/index.js
Module not found: Can't resolve 'elastic-apm-node' in '.pnpm/@elastic[email protected]/node_modules/@elastic/ecs-winston-format'
Should I need to install this? I am not using elastic-apm-node anywhere.
This happens when I trying to integrate with Nextjs. Runs fine otherwise.
This seems to be silently ignored in js file but I still get this error logged in NextJS logs.
Any ideas on how to suppress this error?
The text was updated successfully, but these errors were encountered: