NPM升级后试图在我的主目录中找到package.json

时间:2018-08-06 10:52:29

标签: npm terminal zsh

将npm升级到6.3.0后,每次在Mac上打开终端(ZSH)时,都会出现以下错误:

npm ERR! path /Users/danilo/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/Users/danilo/package.json'
npm ERR! enoent This 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!     /Users/danilo/.npm/_logs/2018-08-06T10_43_16_213Z-debug.log

我尝试了npm cache verifynpm cache clean --force,但是都没有用。这是完整的错误日志:

0 info it worked if it ends with ok
1 verbose cli [ '/Users/danilo/.nvm/versions/node/v8.11.1/bin/node',
1 verbose cli   '/Users/danilo/.nvm/versions/node/v8.11.1/bin/npm',
1 verbose cli   'test',
1 verbose cli   '-w',
1 verbose cli   '/Users/danilo' ]
2 info using npm@6.3.0
3 info using node@v8.11.1
4 verbose config Skipping project config: /Users/danilo/.npmrc. (matches userconfig)
5 verbose stack Error: ENOENT: no such file or directory, open '/Users/danilo/package.json'
6 verbose cwd /Users/danilo
7 verbose Darwin 17.7.0
8 verbose argv "/Users/danilo/.nvm/versions/node/v8.11.1/bin/node" "/Users/danilo/.nvm/versions/node/v8.11.1/bin/npm" "test" "-w" "/Users/danilo"
9 verbose node v8.11.1
10 verbose npm  v6.3.0
11 error path /Users/danilo/package.json
12 error code ENOENT
13 error errno -2
14 error syscall open
15 error enoent ENOENT: no such file or directory, open '/Users/danilo/package.json'
16 error enoent This is related to npm not being able to find a file.
17 verbose exit [ -2, true ]

0 个答案:

没有答案