【问题标题】:npm install failed ? npm installnpm 安装失败? npm 安装
【发布时间】:2020-05-07 20:01:25
【问题描述】:
 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 但它会报错

【问题讨论】:

  • package.json 文件中似乎存在语法错误。将单引号 ' 替换为双引号 "

标签: node.js npm nvm


【解决方案1】:

这个错误说明你的package.json里面有错误, 特别是在声明明确依赖的行附近。

如果您共享了您的 package.json 文件,我们将获得有关该问题的更好信息。

您可以尝试运行以下命令: rm package-lock.json 删除锁定文件并再次运行 npm install 可以帮助解决问题。

【讨论】:

    猜你喜欢
    • 2017-02-04
    • 2012-12-07
    • 1970-01-01
    • 2018-06-06
    • 2020-10-31
    • 2017-12-03
    相关资源
    最近更新 更多