question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm WARN enoent ENOENT: no such file or directory, open '<root>/node_modules/supertest/package.json'

See original GitHub issue

I installed supertest before installing debug and it fixed this error.

Maybe make it a dependency of this module?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:31 (4 by maintainers)

github_iconTop GitHub Comments

93reactions
mooyoulcommented, Apr 8, 2016

No. That’s not an issue of debug package. I think it’s related to NPM v3’s changed installation behavior.

You can resolve that issue by following methods:

  1. Ensure dependencies described correctly on package.json
  2. Just type npm install and hit Enter.
  3. Check issue still exists. and If issue not resolved, continue these methods.
  4. type npm cache clean and hit Enter
  5. type sudo npm install -g npm and hit Enter.
  6. Retry npm install and hit Enter.

if issue not resolved even tried these methods, Please reply with your Node.js version, NPM version, Operating System, and package.json which is using.

67reactions
mooyoulcommented, Sep 17, 2016

@FaShapouri It seems trying npm install in uninitialized npm package directory. you should initialize package with npm init. If you want to use debug without package initialize, just use npm install debug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm WARN enoent ENOENT: no such file or directory, open 'C ...
It creates a package.json file in your folder. Then run,. C:\Users\Nuwanst\Documents\NodeJS\3.chat>npm install socket.
Read more >
npm WARN enoent ENOENT: no such file or directory, open ...
You can resolve that issue by following methods: Ensure dependencies described correctly on package.json; Just type npm install and hit Enter.
Read more >
How to fix: npm ERR! enoent ENOENT: no such file or ...
enoent ENOENT : no such file or directory, rename. I recently struggled for a while with an npm error thrown when executing npm...
Read more >
npm WARN enoent ENOENT no such file or directory open C ...
I just want to install socket.io to my project which is located on 3. chat folder. But when I run following command it...
Read more >
no such file or directory, open \package.json install bootstrap ...
Solved: npm WARN saveError ENOENT : no such file or directory, open \package. json install bootstrap. 22K views 1 year ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found