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)
No. That’s not an issue of
debugpackage. I think it’s related to NPM v3’s changed installation behavior.You can resolve that issue by following methods:
package.jsonnpm installand hit Enter.npm cache cleanand hit Entersudo npm install -g npmand hit Enter.npm installand hit Enter.if issue not resolved even tried these methods, Please reply with your Node.js version, NPM version, Operating System, and
package.jsonwhich is using.@FaShapouri It seems trying
npm installin uninitialized npm package directory. you should initialize package withnpm init. If you want to use debug without package initialize, just usenpm 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 installbut i needed to be in my cloned git directory:
~/dev/quiztool$ npm installi am having problem installing npm …it keep getting this: npm WARN enoent ENOENT: no such file or directory, open ‘/Users/jamesosaedebiri/package.json’
npm inithttp://weaintplastic.github.io/web-development-field-guide/Development/Frontend_Development/Setting_up_your_project/Setup_Dependency_Managers/Node_Package_Manager/Initialize_NPM_on_a_new_project.html
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.