---
title: Troubleshoot your Node.js installation
source: https://docs.newrelic.com/docs/apm/agents/nodejs-agent/troubleshooting/troubleshoot-your-nodejs-installation
---

## 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:

**Not seeing data**

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](https://docs.newrelic.com/docs/agents/manage-apm-agents/troubleshooting/new-relic-diagnostics) to try to automatically identify the issue.

**Installation problems**

| **What to check** | **Comments**                                                                                                                                                                                                                                                                                                                                                                                                |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Run script        | Ensure that you `newrelic` module is loaded first by using `-r/--require` flag: `node -r newrelic your-program.js`.                                                                                                                                                                                                                                                                                         |
| Main module       | If you cannot control how your main module is run, ensure that you have added `require('newrelic')` as the first line of the app's main module. If the require is added later, the Node.js agent may not properly instrument your application.                                                                                                                                                              |
| Conditional logic | If you have any conditional logic in your `require`, move the conditional logic to your `newrelic.js` configuration file.                                                                                                                                                                                                                                                                                   |
| Frameworks        | For problems with [supported frameworks](https://docs.newrelic.com/docs/agents/nodejs-agent/getting-started/new-relic-nodejs#requirements), 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](https://docs.newrelic.com/docs/apm/new-relic-apm/apdex/apdex-measuring-user-satisfaction) results, try adjusting your Apdex score via your [Node.js agent config file](https://docs.newrelic.com/docs/nodejs/customizing-your-nodejs-config-file#apdex) (`newrelic.js`) or the [New Relic user interface](https://docs.newrelic.com/docs/site/changing-your-apdex-settings). |

**Log files**

The Node.js agent writes its log to the `newrelic_agent.log` file in the application directory, unless you have changed the [logging settings](https://docs.newrelic.com/docs/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration#logging_config). If the agent does not send data or crashes your app, you can generate a [troubleshooting log file](https://docs.newrelic.com/docs/agents/nodejs-agent/troubleshooting/generate-trace-log-troubleshooting-nodejs) to accompany bug reports and [support requests](https://docs.newrelic.com/docs/accounts-partnerships/education/getting-started-new-relic/finding-help).

**Missing VM metrics**

The agent can collect VM metrics related to garbage collection (GC), memory, and CPU. Some of these metrics require an [additional native module](https://docs.newrelic.com/docs/agents/nodejs-agent/supported-features/node-vm-measurements) 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 error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
```

```
gyp ERR! build error
gyp ERR! stack Error: not found: make
```

```
make: g++: Command not found
```

<DNT>
  **Solution**
</DNT>

Ensure that the prerequisites for the `node-gyp` module are installed. On Debian/Ubuntu platforms, use this command:

```bash
apt-get install build-essential
```

For more information, see [Node.js VM measurements](/docs/agents/nodejs-agent/extend-your-instrumentation/nodejs-vm-measurements).

````

Other troubleshooting resources on our Support Forum forum:

-   [Troubleshooting install](https://knowledge.newrelic.com/s/article/Nodejs-Troubleshooting-Framework-Install)
-   [General configuration troubleshooting](https://knowledge.newrelic.com/s/article/Nodejs-Troubleshooting-Framework-Configuration)
