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
debug
package. I think it’s related to NPM v3’s changed installation behavior.You can resolve that issue by following methods:
package.json
npm install
and hit Enter.npm cache clean
and hit Entersudo npm install -g npm
and hit Enter.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 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 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’
npm init
http://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.