Expressで新規にファイルを生成しました。
できたpackage.jsonにsocket.ioのみ追加し、npm installをしました。
{ "name": "test_app", "version": "0.0.0", "private": true, "scripts": { "start": "node ./bin/www" }, "dependencies": { "body-parser": "~1.13.1", "cookie-parser": "~1.3.5", "debug": "~2.2.0", "express": "~4.13.0", "jade": "~1.11.0", "socket.io": "*" "morgan": "~1.6.1", "serve-favicon": "~2.3.0" } }
しかし、以下のエラーがでてしまい、詰まっております。
npm ERR! install Couldn't read dependencies npm ERR! Darwin 14.3.0 npm ERR! argv "node" "/usr/local/bin/npm" "install" npm ERR! node v0.10.35 npm ERR! npm v2.11.1 npm ERR! file /Users/user_name/test_app/package.json npm ERR! code EJSONPARSE npm ERR! Failed to parse json npm ERR! Unexpected token 'm' at 15:6 npm ERR! "morgan": "~1.6.1", npm ERR! ^ npm ERR! File: /Users/user_name/test_app/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! /Users/user_name/test_app/npm-debug.log
socket.ioは以下の通り、入っております。
(npm install -g express でいれました。)
/usr/local/lib └── socket.io@1.3.5
npm -v 2.11.1
尚、package.jsonでsocket.ioを抜いて、npm installをすると上手くいきます。
どなたかご享受願えますでしょうか?
宜しくお願いします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。