私がインストールしようとしているのは、Ubuntu 16.04 LTSの端末内に[email protected]:~/chatapplication$ npm install
です。NPMをインストールしようとすると「npm ERR!」が表示されます。
これは私が上で働いていた、ところで私のチャットアプリケーションです:私はこのエラーを取得する
{
"name":"chat",
"version":"0.0.1",
"private":"true",
"dependencies":
{
"socket.io":"1.4.8",
"express":"4.14.0",
}
}
:
[email protected]:~$ npm info socket.io version
1.4.8
[email protected]:~$ npm info express version
4.14.0
[email protected]:~$ cd chat application
bash: cd: chat: No such file or directory
[email protected]:~$ cd chat application
bash: cd: chat: No such file or directory
[email protected]:~$ cd /home/chat application
bash: cd: /home/chat: No such file or directory
[email protected]:~$ cd /home/chat application/
bash: cd: /home/chat: No such file or directory
[email protected]:~$ pwd
/home/alphaunlimitedg
[email protected]:~$ cd /home/alphaunlimitedg/chat application
bash: cd: /home/alphaunlimitedg/chat: No such file or directory
[email protected]:~$ cd /home/alphaunlimitedg/chat application/
bash: cd: /home/alphaunlimitedg/chat: No such file or directory
[email protected]:~$ cd chatapplication
[email protected]:~/chatapplication$ npm install
npm ERR! Linux 4.4.0-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! file /home/alphaunlimitedg/chatapplication/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected token '.' at 3:15
npm ERR! "version":""0.0.1",
npm ERR! ^
npm ERR! File: /home/alphaunlimitedg/chatapplication/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! /home/alphaunlimitedg/chatapplication/npm-debug.log
[email protected]:~/chatapplication$ npm install
npm ERR! Linux 4.4.0-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! file /home/alphaunlimitedg/chatapplication/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Trailing comma in object at 8:2
npm ERR! }
npm ERR! ^
npm ERR! File: /home/alphaunlimitedg/chatapplication/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! /home/alphaunlimitedg/chatapplication/npm-debug.log
[email protected]:~/chatapplication$ npm install
npm ERR! Linux 4.4.0-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! file /home/alphaunlimitedg/chatapplication/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! No value found for key dependencies at 5:17
npm ERR! "dependencies":,
npm ERR! ^
npm ERR! File: /home/alphaunlimitedg/chatapplication/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! /home/alphaunlimitedg/chatapplication/npm-debug.log
[email protected]:~/chatapplication$ npm install
npm ERR! Linux 4.4.0-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! file /home/alphaunlimitedg/chatapplication/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Trailing comma in object at 9:2
npm ERR! }
npm ERR! ^
npm ERR! File: /home/alphaunlimitedg/chatapplication/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! /home/alphaunlimitedg/chatapplication/npm-debug.log
[email protected]:~/chatapplication$ npm install
npm ERR! Linux 4.4.0-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! file /home/alphaunlimitedg/chatapplication/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Trailing comma in object at 10:1
npm ERR! }
npm ERR!^
npm ERR! File: /home/alphaunlimitedg/chatapplication/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! /home/alphaunlimitedg/chatapplication/npm-debug.log
私はあなたがNPMを実行するために見ることができるように上記のいくつかの試みを試みましたコマンドラインをインストールします。
しかし何らかの理由でこれがうまくいかず、UbuntuのOSがサポートされていないか、または.jsonが実際のJSONファイルである必要がありますまだ完了しましたか?エラーがそれ自体を記述するのでJavaScriptだけではありません。
誰でも私に手伝ってください。
する必要があり、それはあなたの 'package.json'をチェック – Vinz243
削除しよう。あなたの 'package.json'は有効なJSON形式ではなく、8:2に近いエラーを含んでいます。末尾のカンマがあるかもしれません:-) –