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"
你運行的是什麼命令會導致錯誤,你的節點版本是什麼? – netchkin
嘗試從命令行/ shell執行'sudo apt-get install nodejs-legacy'。 –
@netchkin'npm start' –