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

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

Maybe make it a dependency of this module?

About this issue

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

Most upvoted comments

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.

@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.

Simply try npm install npm@latest -g it worked for me cheers.

if you are pretty new to Node/github/etc., you might be doing what I did – cloned a repo and then forgot to cd into the repo directory – so npm can’t find a package.json file, so it gives you that big convoluted error message.

i was operating in my main ‘dev’ directory:

~/dev$ npm install

but i needed to be in my cloned git directory:

~/dev/quiztool$ npm install

i am having problem installing npm …it keep getting this: npm WARN enoent ENOENT: no such file or directory, open ‘/Users/jamesosaedebiri/package.json’

Indeed what it wants is a package.json file, obtained by typing npm init. Then I was able to do an npm install with success.

This module does not use supertest, and thus is not an issue for debug. Closing.