首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用concurrently.js构建的React没有找到build命令[ not脚本:命令未找到]

使用concurrently.js构建的React没有找到build命令[ not脚本:命令未找到]
EN

Stack Overflow用户
提问于 2018-01-04 17:12:05
回答 1查看 1K关注 0票数 2

我正在尝试部署一个使用express的react应用程序,并同时在ElasticBean秸秆上部署,但是我发现了一个错误,它找不到react脚本命令。我已经双重检查了react脚本是json中的一个依赖项(它由react自动生成),所以我不太清楚为什么它仍然找不到它。

下面是日志

代码语言:javascript
复制
-------------------------------------
/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

预先多谢!:)

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-01-17 11:26:04

这不是create-react-app问题,而是npm问题。检查这个链接https://github.com/npm/npm/issues/17379

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48100288

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档