npm安装失败?

问题描述 投票:0回答:1
 npm install --build-from-source
npm ERR! code EJSONPARSE
npm ERR! file /home/falcon/package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected end of JSON input while parsing near '...ess": "^4.16.1"
npm ERR! JSON.parse   }
npm ERR! JSON.parse 
npm ERR! JSON.parse '
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/falcon/.npm/_logs/2020-05-07T19_58_48_436Z-debug.log

我想在ubuntu的构建源上安装npm,但会出现错误。

node.js npm nvm
1个回答
0
投票

这个错误表明在你的package.json中存在一个错误,特别是在声明express依赖关系的那一行。

如果你能分享你的package.json文件,我们就能更好地了解问题所在。

你可以尝试运行下面的命令:rm package-lock.json 删除锁文件并再次运行npm安装可以帮助解决这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.