问题:win10上安装socket.io

D:\learing program\后端练习\node.js\messaging>npm install socket.io --save
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "socket.io" "--save"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10

npm ERR! file D:\learing program\后端练习\node.js\messaging\package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: D:\learing program\后端练习\node.js\messaging\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! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! Please include the following file with any support request:
npm ERR!     D:\learing program\后端练习\node.js\messaging\npm-debug.log

安装命令为npm官网命令npm install socket.io --save

解决方案:

将安装目录改为node.js的安装目录,在node.js目录下安装

win10上安装socket.io

相关文章:

  • 2022-02-10
  • 2022-03-07
  • 2021-12-07
  • 2021-06-29
  • 2021-09-07
  • 2021-12-07
  • 2021-07-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-02
  • 2021-06-02
  • 2022-01-23
  • 2021-10-13
相关资源
相似解决方案