使用express设置服务器



我在尝试在node_modules中安装express时出错。在这种情况发生的时候有任何见解。

$ npm install express
npm ERR! file C:UserscalloOneDriveDesktopPROFESSIONALDevops_FullStack InternshipOnline_learningweek 3es6moduleses6modulespackage.json
npm ERR! code EJSONPARSE
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token / in JSON at position 157 while parsing near '...emon server.js"
npm ERR! JSON.parse     //"test": "echo "Er...'
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!     C:UserscalloAppDataRoamingnpm-cache_logs2020-12-01T06_31_01_997Z-debug.log ```

我后来发现问题出在package.json中。我在package.json中删除了extra/,这帮我解决了问题。

最新更新