npm不会安装依赖项-Windows 10

时间:2019-06-28 18:43:33

标签: node.js npm windows-10 npm-install

我有一个package.json(使用npm init创建),当我运行npm install时,我不断收到此错误:

"npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules\axios" as it does not 
contain a package.json file."

我猜这是某种环境问题,因为我的项目都不会再安装其依赖项了。

我正在运行64位Windows 10计算机

我已卸载并重新安装npm / node。 我降级了npm和node。 我手动删除了node_modules文件夹 我删除并重新创建了package.json

这是我的调试日志的开头和结尾:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\usr\\local\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install' ]
2 info using npm@5.10.0
3 info using node@v10.16.0
...
2261 silly pacote range manifest for require-sql@^1.0.0 fetched in 2ms
2262 silly resolveWithNewModule require-sql@1.0.0 checking installable status
2263 silly pacote range manifest for sqlite3@^4.0.9 fetched in 2ms
2264 silly resolveWithNewModule sqlite3@4.0.9 checking installable status
2265 timing stage:rollbackFailedOptional Completed in 1ms
2266 timing stage:runTopLevelLifecycles Completed in 6407ms
2267 silly saveTree ichooseme@1.0.0
2267 silly saveTree +-- body-parser@1.19.0
2267 silly saveTree +-- cors@2.8.5
2267 silly saveTree +-- express@4.17.1
2267 silly saveTree +-- fs@0.0.1-security
2267 silly saveTree +-- morgan@1.9.1
2267 silly saveTree +-- nodemon@1.19.1
2267 silly saveTree +-- parcel@1.12.3
2267 silly saveTree +-- parser@0.1.4
2267 silly saveTree +-- path@0.12.7
2267 silly saveTree +-- react-dom@16.8.6
2267 silly saveTree +-- react@16.8.6
2267 silly saveTree +-- request@2.88.0
2267 silly saveTree +-- require-sql@1.0.0
2267 silly saveTree `-- sqlite3@4.0.9
2268 verbose stack Error: ENOENT: no such file or directory, open 'C:\Users\CaseyWade\Documents\Code\HackReactor\HRNYC22\MVP\iChooseMe\node_modules\axios\package.json'
2269 verbose cwd C:\Users\Casey 
Wade\Documents\Code\HackReactor\HRNYC22\MVP\iChooseMe
2270 verbose Windows_NT 10.0.17134
2271 verbose argv "C:\\Program Files\\nodejs\\node.exe" 
"C:\\usr\\local\\node_modules\\npm\\bin\\npm-cli.js" "install"
2272 verbose node v10.16.0
2273 verbose npm  v5.10.0
2274 error code ENOLOCAL
2275 error Could not install from "node_modules\axios" as it does not 
contain a package.json file.
2276 verbose exit [ 1, true ]

0 个答案:

没有答案