Skip to content
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

New Relic for Node.js was unable to start due to an error: Error: EISDIR, illegal operation on a directory #118

Closed
maumercado opened this issue Feb 18, 2014 · 8 comments

Comments

@maumercado
Copy link

Hello, Im having the following error initializing new relics config and monitoring
--> /home_dir/.npm/package.json

New Relic for Node.js was unable to start due to an error:
Error: EISDIR, illegal operation on a directory
at Object.fs.readSync (fs.js:476:19)
at Object.fs.readFileSync (fs.js:310:28)
at /home_dir/node_modules/newrelic/lib/environment.js:86:37
at Array.map (native)
at listPackages (/home_dir/node_modules/newrelic/lib/environment.js:83:8)
at getPackages (/home_dir/node_modules/newrelic/lib/environment.js:160:16)
at /home_dir/node_modules/newrelic/lib/environment.js:273:21
at Array.forEach (native)
at findPackages (/home_dir/node_modules/newrelic/lib/environment.js:271:11)
at Object. (/home_dir/node_modules/newrelic/lib/environment.js:350:1)

@groundwater
Copy link
Contributor

Hey @maumercado, sorry to see you had trouble deploying the agent.

Do you mind if I ask what version of the agent you're using? We had a bug in an older version which choked in a very similar fashion to what you're seeing now. If you've got an older version, can you try upgrading to the latest and see if that fixes the problem?

If you already have the latest, I may ask for some additional details about your deployment. In the mean time, I'll double-check that section of the code, just in case.

Thanks for the stack trace! I hope can fix your issue soon.

@maumercado
Copy link
Author

Hey @groundwater Im using the latest new relic 1.3.2

@groundwater
Copy link
Contributor

Is there a chance that /opt/selfietest/.npm/package.json is a directory, or a symlink pointing to a directory?

It seems to be throwing here which would definitely throw if it cannot read package.json.

At the very least, this should not crash your app. I think in this case it should not impair the agent from starting either.

@maumercado
Copy link
Author

yes its a directory!

@groundwater
Copy link
Contributor

So the short term fix is to either delete that, or change it to a file. This is definitely a bug however, so I'll get a fix into the next release.

Thanks for the excellent sleuthing!

I'm going to leave this issue open until the fix is out.

@maumercado
Copy link
Author

Awesome @groundwater thanks for your help!

@groundwater
Copy link
Contributor

@maumercado not a problem, thanks for using the node agent!

@groundwater
Copy link
Contributor

This should be fixed in v1.5.2

cmcadams-newrelic pushed a commit to cmcadams-newrelic/node-newrelic that referenced this issue Jan 29, 2024
…/graphql-koa-dataloader/app/word-wrap-1.2.4

chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 in /graphql-koa-dataloader/app
jsumners-nr pushed a commit to jsumners-nr/node-newrelic that referenced this issue Apr 11, 2024
chore: removed newrelic as peer dep as standalone is no longer supported
jsumners-nr pushed a commit to jsumners-nr/node-newrelic that referenced this issue Apr 16, 2024
…/moment-2.29.4

Bump moment from 2.29.2 to 2.29.4
bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this issue Apr 19, 2024
added semver check on agent for v3 instrumentation
bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this issue Apr 23, 2024
added semver check on agent for v3 instrumentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants