Problem
If you have encountered any of these common problems after installing your New Relic Node.js agent, try these troubleshooting tips.
Solution
Some common problems users encounter after installing the New Relic Node.js agent include:
To minimize the amount of bandwidth the Node.js agent consumes, New Relic only reports data once per minute. If you add the agent to tests that take less than a minute to run, it will not have time to report data to New Relic.
If you do not see transaction traces or other data after deploying the agent, this may be due to configuration, framework, or Apdex settings. Use New Relic Diagnostics to try to automatically identify the issue.
What to check | Comments |
---|---|
Run script | Ensure that you |
Main module | If you cannot control how your main module is run, ensure that you have added |
Conditional logic | If you have any conditional logic in your |
Frameworks | For problems with supported frameworks, make sure you are using Connect, Express, Hapi, Kraken, or Restify. There are other Node.js frameworks, but New Relic does not support all of them. |
Apdex | For problems with your Apdex results, try adjusting your Apdex score via your Node.js agent config file ( |
The Node.js agent writes its log to the newrelic_agent.log
file in the application directory, unless you have changed the logging settings. If the agent does not send data or crashes your app, you can generate a troubleshooting log file to accompany bug reports and support requests.
The agent can collect VM metrics related to garbage collection (GC), memory, and CPU. Some of these metrics require an additional native module to be installed.
Here are some common problems and their solutions:
Problem
During installation, npm shows one of the following error messages:
gyp ERR! configure errorgyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! build errorgyp ERR! stack Error: not found: make
make: g++: Command not found
Solution
Ensure that the prerequisites for the node-gyp
module are installed. On Debian/Ubuntu platforms, use this command:
$apt-get install build-essential
For more information, see Node.js VM measurements.
Other troubleshooting resources on our Support Forum forum: