【问题标题】:JSON Parsing error JSON code verified correct, error persistsJSON解析错误JSON代码验证正确,错误仍然存​​在
【发布时间】:2020-08-04 02:31:47
【问题描述】:

我尝试清除缓存 + --强制清除缓存,花了很多天寻找解决方案,但当我尝试“npm install”命令时问题仍然存在。请参阅下面的语法:

请帮忙!

npm ERR! file C:\Users\luisl\package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected token } in JSON at position 627 while parsing near '...tract": "3.0.6",
npm ERR!   }
npm ERR! }
npm ERR! '
npm ERR! File: C:\Users\luisl\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! A complete log of this run can be found in:

【问题讨论】:

  • 你能复制你的 package.json 的内容并在这里分享,这样我们就可以清楚地了解你的问题。它似乎只是缺少逗号(,)或者你有更多的右括号
  • 你的 package.json 格式不正确

标签: node.js json npm


【解决方案1】:

感谢罗伯特回答我的问题。我发现Json not found Parsing 错误。是由于在 C: 驱动器中的错误归档。当我将 Json 文件移动到正确的路径时,它解决了问题,C:\Users\YourUserName\eth-todo-list。在此处保存文件。希望这对将来的某人有所帮助。确保将 Json 保存在正确的文件目录中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-07-17
    • 1970-01-01
    • 2019-05-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-22
    • 1970-01-01
    相关资源
    最近更新 更多