首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在heroku上部署ant.design全栈

如何在heroku上部署ant.design全栈
EN

Stack Overflow用户
提问于 2018-01-27 12:06:17
回答 1查看 628关注 0票数 0

我将我的样式从material-css切换到ant.design。为此,我必须将我的客户端package.json更改为使用react-app-rewired而不是react-scripts

代码语言:javascript
复制
"scripts": {
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test --env=jsdom",
    "eject": "react-scripts eject"
},

当我将其推送到heroku时,它找不到命令。为什么会这样呢?

我从我的heroku构建日志中得到以下错误:

代码语言:javascript
复制
      > react-app-rewired build

sh: 1: react-app-rewired: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! client@0.1.0 build: `react-app-rewired build`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the client@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /app/.npm/_logs/2018-01-27T03_26_58_947Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! infinity2o_server@1.0.0 heroku-postbuild: `NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the infinity2o_server@1.0.0 heroku-postbuild script.
EN

回答 1

Stack Overflow用户

发布于 2018-01-27 12:31:42

我的问题是将"react-app-rewired": "^1.4.0"作为"devDependencies",而不是在"dependencies"中进行生产:)

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

https://stackoverflow.com/questions/48472491

复制
相关文章

相似问题

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