vercel / vercel/ncc

New Relic fails to load supported packages

Open
#487 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
9.8k
Forks
326
PR merge metrics
No merged PRs in 30d

Description

When using ncc with a project that requires newrelic, the agent fails loading the files required for instrumentation:

{"msg":"Tried to load instrumentation from /var/app/globals.js, but file does not exist","component":"shimmer"}
{"msg":"Tried to load instrumentation from /var/app/core/child_process.js, but file does not exist","component":"shimmer"}
{"msg":"Tried to load instrumentation from /var/app/core/crypto.js, but file does not exist","component":"shimmer"}
{"msg":"Tried to load instrumentation from /var/app/core/dns.js, but file does not exist","component":"shimmer"}
{"msg":"Tried to load instrumentation from /var/app/core/fs.js, but file does not exist","component":"shimmer"}
{"msg":"Tried to load instrumentation from /var/app/core/http.js, but file does not exist","component":"shimmer"}
{"msg":"Tried to load instrumentation from /var/app/core/http.js, but file does not exist","component":"shimmer"}
{"msg":"Tried to load instrumentation from /var/app/core/inspector.js, but file does not exist","component":"shimmer"}
{"msg":"Tried to load instrumentation from /var/app/core/net.js, but file does not exist","component":"shimmer"}
{"msg":"Tried to load instrumentation from /var/app/core/timers.js, but file does not exist","component":"shimmer"}
{"msg":"Tried to load instrumentation from /var/app/core/zlib.js, but file does not exist","component":"shimmer"}
{"msg":"Failed to load instrumentation for @newrelic/koa {\"code\":\"MODULE_NOT_FOUND\",\"requireStack\":[\"/var/app/empty.js\"]}","component":"shimmer"}
{"msg":"Failed to load instrumentation for @newrelic/superagent {\"code\":\"MODULE_NOT_FOUND\",\"requireStack\":[\"/var/app/empty.js\"]}","component":"shimmer"}

Is there a way I can get those files to be included int he bundle?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with ncc and a project that requires newrelic, then inspect how the bundle handles the reported globals.js, core module paths, and @newrelic instrumentation packages. Confirm the expected behavior with New Relic's supported packages; done means the resulting bundle loads the required instrumentation without MODULE_NOT_FOUND or missing-file errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.