我正在尝试部署一个使用express的react应用程序,并同时在ElasticBean秸秆上部署,但是我发现了一个错误,它找不到react脚本命令。我已经双重检查了react脚本是json中的一个依赖项(它由react自动生成),所以我不太清楚为什么它仍然找不到它。
下面是日志
-------------------------------------
/var/log/nodejs/nodejs.log
-------------------------------------
[0]
[0] > project-deztructicus@0.1.0 server-live /var/app/current
[0] > node server.js
[0]
[0] Server started on port 5000
[1]
[1] > client@0.1.0 start /var/app/current/client
[1] > react-scripts start
[1]
[1] sh: react-scripts: command not found
[1] npm ERR! file sh
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno ENOENT
[1] npm ERR! syscall spawn
[1] npm ERR! client@0.1.0 start: `react-scripts start`
[1] npm ERR! spawn ENOENT
[1] npm ERR!
[1] npm ERR! Failed at the client@0.1.0 start script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1] npm WARN Local package.json exists, but node_modules missing, did you mean to install?
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno 1
[1] npm ERR! project-deztructicus@0.1.0 client: `npm start --prefix client`
[1] npm ERR! Exit status 1
[1] npm ERR!
[1] npm ERR! Failed at the project-deztructicus@0.1.0 client script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1] npm run client exited with code 1预先多谢!:)
发布于 2018-01-17 11:26:04
这不是create-react-app问题,而是npm问题。检查这个链接https://github.com/npm/npm/issues/17379
https://stackoverflow.com/questions/48100288
复制相似问题