2016-11-04 11 views
2

私はjsに反応するのが新しく、アプリケーションの依存関係をインストールしました。以下は私のパッケージファイルです:npmが奇妙なエラーを表示し始めます1

package.json

{ 
"name": "reactapp", 
"version": "0.0.0", 
"description": "learn and test", 
"main": "index.js", 
"scripts": { 
    "start": "webpack-dev-server --hot" 
}, 
"author": "john doe", 
"license": "BSD-2-Clause", 
"dependencies": { 
    "webpack": "~1.13.3", 
    "webpack-dev-server": "~1.16.2", 
    "react": "~15.3.2", 
    "react-dom": "~15.3.2" 
}, 
"devDependencies": {} 
} 

はそれでエラーが発生します:

npm ERR! weird error 1 
npm WARN This failure might be due to the use of legacy binary "node" 
npm WARN For further explanations, please read 
/usr/share/doc/nodejs/README.Debian 

npm ERR! not ok code 0 

しかし、ターミナル内のスクリプトで、それは

あるとき、それは何も表示されませんが

"test": "echo \"Error: no test specified\" && exit 1"

+0

どのコマンドを実行してエラーが発生し、ノードのバージョンは何ですか? – netchkin

+2

あなたのコマンドライン/シェルから 'sudo apt-get install nodejs-legacy'を実行してみてください。 –

+0

@netchkin 'npm start' –

答えて

3

インストール中にコマンドを実行します。​​。

コマンドライン/シェルからsudo apt-get install nodejs-legacyを実行すると問題が解決されます。

関連する問題