您的位置:首页 > Web前端 > Node.js

win10上安装socket.io

2017-08-21 12:23 411 查看

问题: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目录下安装

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  node.js npm