【发布时间】:2016-11-04 07:46:20
【问题描述】:
我是 react js 的新手,我已经安装了应用程序的依赖项。下面是我的包文件:
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"
【问题讨论】:
-
你运行什么命令导致错误,你的节点版本是什么?
-
尝试从命令行/shell执行
sudo apt-get install nodejs-legacy。 -
@netchkin
npm start -
@DavidR 成功了,伙计
-
@AbhishekDhanrajShahdeo Cool.. 那你能接受我的回答吗?
标签: node.js reactjs npm command-line-interface