debug icon indicating copy to clipboard operation
debug copied to clipboard

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

Open jshbrntt opened this issue 10 years ago • 31 comments

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

Maybe make it a dependency of this module?

jshbrntt avatar Feb 03 '16 10:02 jshbrntt

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.

mooyoul avatar Apr 08 '16 21:04 mooyoul

@mooyoul I have that problem and tried your solution. But my problem did not resolve. I am using mac os 10.11.4 and Node 6.2.2 and npm 3.9.5

The node_modules is in user/muser/node_modules/ I see mysql package in this folder But when I try nam install, below message appears on terminal:

npm WARN enoent ENOENT: no such file or directory, open '/Users/muser/package.json'
npm WARN muser No description
npm WARN muser No repository field.
npm WARN muser No README data
npm WARN muser No license field.

There is no package.json at '/Users/muser/package.json'

What is wrong in my setup? and how can I fix it.

FaShapouri avatar Sep 16 '16 19:09 FaShapouri

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

mooyoul avatar Sep 17 '16 06:09 mooyoul

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

Okezie avatar Dec 08 '16 19:12 Okezie

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

TooTallNate avatar Dec 08 '16 21:12 TooTallNate

Try to change your node.js version

mriscoramdani avatar Jan 08 '17 23:01 mriscoramdani

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

osa9j avatar Feb 02 '17 17:02 osa9j

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.

dylannirvana avatar Feb 13 '17 23:02 dylannirvana

WARN enoent ENOENT: no such file or directory, open '/home/nodeuser/hapi-mysql-unchained/node_modules/request/package.json' npm WARN [email protected] No description npm WARN [email protected] No repository field. npm ERR! Linux 4.4.0-36-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v6.9.2 npm ERR! npm v4.2.0 npm ERR! path /home/nodeuser/hapi-mysql-unchained/node_modules/node-pre-gyp/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/home/nodeuser/hapi-mysql-unchained/node_modules/node-pre-gyp/node_modules' npm ERR! at Error (native) npm ERR! { Error: EACCES: permission denied, access '/home/nodeuser/hapi-mysql-unchained/node_modules/node-pre-gyp/node_modules' npm ERR! at Error (native) npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/home/nodeuser/hapi-mysql-unchained/node_modules/node-pre-gyp/node_modules' }

anilkumarsoni avatar Feb 15 '17 06:02 anilkumarsoni

  1. node.js version - v7.7.1
  2. npm version - 4.3.0
  3. operating system ubuntu 14.04
  4. package.json at /home/faltu/package.json is not there

mukun-bhatta avatar Mar 08 '17 10:03 mukun-bhatta

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

shmooth avatar Mar 09 '17 03:03 shmooth

ubuntu@ubuntu:~$ npm install debug npm ERR! Linux 4.8.0-22-generic npm ERR! argv "/home/ubuntu/.nvm/versions/node/v7.7.2/bin/node" "/home/ubuntu/.nvm/versions/node/v7.7.2/bin/npm" "install" "debug" npm ERR! node v7.7.2 npm ERR! npm v4.1.2 npm ERR! code ENOTFOUND npm ERR! errno ENOTFOUND npm ERR! syscall getaddrinfo

npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443 npm ERR! network This is most likely not a problem with npm itself npm ERR! network and is related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! Please include the following file with any support request: npm ERR! /home/ubuntu/npm-debug.log

MarcioDuran avatar Mar 14 '17 17:03 MarcioDuran

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

sudosoph avatar Mar 22 '17 20:03 sudosoph

If you don't initialize your repo using npm init and complete package.json fields properly (or leave some blank), you might still get warnings. I followed this template and errors are gone: https://docs.npmjs.com/getting-started/using-a-package.json

sudosoph avatar Mar 22 '17 20:03 sudosoph

you can try "npm install -g [email protected]", i did it successfully in this way.

WJLkalin avatar Apr 05 '17 15:04 WJLkalin

Please try, npm install npm@latest -g

the output you will get as below

C:\Users*\AppData\Roaming\npm\npm -> C:\Users*\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js C:\Users*****\AppData\Roaming\npm -- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] | -- [email protected] | -- [email protected] | -- [email protected] +-- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] | -- [email protected] | -- [email protected] | -- [email protected] | +-- [email protected] | -- [email protected] +-- [email protected] | +-- [email protected] | +-- [email protected] | | -- [email protected] | | +-- [email protected] | | -- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] | -- [email protected] +-- [email protected] | +-- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] | +-- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] | +-- [email protected] | | -- [email protected] | +-- [email protected] | | +-- [email protected] | | | -- [email protected] | | -- [email protected] | +-- [email protected] | | -- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | | -- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | | -- [email protected] | -- [email protected] | -- [email protected] +-- [email protected] | -- [email protected] +-- [email protected] | +-- [email protected] | -- [email protected] +-- [email protected] | +-- [email protected] | | -- [email protected] | | +-- [email protected] | | -- [email protected] | -- [email protected] +-- [email protected] | -- [email protected] | +-- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] | -- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] | -- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] | +-- [email protected] | | -- [email protected] | +-- [email protected] | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | | +-- [email protected] | | | -- [email protected] | | | -- [email protected] | | +-- [email protected] | | -- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] | +-- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] | -- [email protected] +-- [email protected] | -- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | | -- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | | -- [email protected] | +-- [email protected] | | +-- [email protected] | | | +-- [email protected] | | | -- [email protected] | | | -- [email protected] | | -- [email protected] | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | -- [email protected] | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | -- [email protected] | | -- [email protected] | | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | -- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | | -- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | | -- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] | +-- [email protected] | | -- [email protected] | | +-- [email protected] | | +-- [email protected] | | -- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] | +-- [email protected] | | +-- [email protected] | | | -- [email protected] | | | +-- [email protected] | | | -- [email protected] | | | -- [email protected] | | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | | -- [email protected] | | +-- [email protected] | | | -- [email protected] | | | +-- [email protected] | | | | -- [email protected] | | | | +-- [email protected] | | | | -- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | -- [email protected] | | -- [email protected] | | -- [email protected] | | +-- [email protected] | | -- [email protected] | | -- [email protected] | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | +-- [email protected] | | -- [email protected] | +-- [email protected] | | +-- [email protected] | | | -- [email protected] | | -- [email protected] | | -- [email protected] | +-- [email protected] | +-- [email protected] | | -- [email protected] | | +-- [email protected] | | | +-- [email protected] | | | | -- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | -- [email protected] | | | -- [email protected] | | +-- [email protected] | | | -- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | -- [email protected] | | -- [email protected] | | -- [email protected] | | +-- [email protected] | | +-- [email protected] | | -- [email protected] | +-- [email protected] | +-- [email protected] | -- [email protected] +-- [email protected] +-- [email protected] | +-- [email protected] | | -- [email protected] | -- [email protected] | +-- [email protected] | -- [email protected] +-- [email protected] | -- [email protected] +-- [email protected] | -- [email protected] +-- [email protected] -- [email protected]

later install bootstrap, try below $ npm install -g [email protected]

C:\Users******\AppData\Roaming\npm -- [email protected] +-- [email protected] -- [email protected]

amaljose01 avatar Apr 07 '17 02:04 amaljose01

while publishing my package was having package.json... so why it is not downloaded when i am installing my package

jitendragupta2 avatar May 23 '17 12:05 jitendragupta2

New to node... setup EC2 > AMAZON linux.. Node setup.. tried all kinds of versions..

no matter what i do, errors are obtained during install..

tried npm init... tried diff versions of all parts... still I can't get a successful install & test code always fails.

Errors below. Please advise

npm install pdfkit npm WARN saveError ENOENT: no such file or directory, open '/home/ec2-user/package.json' npm WARN enoent ENOENT: no such file or directory, open '/home/ec2-user/package.json' npm WARN ec2-user No description npm WARN ec2-user No repository field. npm WARN ec2-user No README data npm WARN ec2-user No license field. npm WARN ec2-user Invalid dependency: png-js undefined

No matter what I install or how, i get these:

npm WARN saveError ENOENT: no such file or directory, open '/home/ec2-user/package.json' npm WARN enoent ENOENT: no such file or directory, open '/home/ec2-user/package.json'

ctoxyz avatar May 26 '17 17:05 ctoxyz

You have to cd into location where package.json is; like assets in phoenix 1.3.x

mihai-ciupina avatar May 31 '17 10:05 mihai-ciupina

Angular 2 project not run forever show these errors: npm ERR! path /package.json npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open '/package.json' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2017-05-30T12_02_40_976Z-debug.log error: Forever detected script exited with code: 254 error: Script restart attempt #1 npm ERR! path /package.json npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open '/package.json' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent

abdulmananse avatar May 31 '17 10:05 abdulmananse