我该如何解决无业游民安装React App中的错误?

时间:2018-11-09 17:23:13

标签: node.js reactjs npm installation

我尝试删除package-lock.json和node_modules,然后使用npm install重新安装,问题是相同的。我使用sudo运行npm startnpm test

这就是我得到的:

$ npm run build

my-react-app@0.1.0 build /home/vagrant/projects/my-react-app

react-scripts build

sh: 1: react-scripts: not found npm ERR! 
file sh npm ERR! code

ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR!

my-react-app@0.1.0 build: `react-scripts build` npm ERR! spawn ENOENT

npm ERR! npm ERR! Failed at the my-react-app@0.1.0 build script. npm

ERR! This is probably not a problem with npm. There is likely

additional logging output above.

0 个答案:

没有答案