如何在heroku上部署ant.design完整堆栈

时间:2018-01-27 04:06:17

标签: node.js heroku create-react-app antd react-scripts

我将我的样式从material-css切换到ant.design。为此,我不得不将我的客户端package.json更改为import React from 'react'; import ReactDOM from 'react-dom'; import config from './my/relative/config/path/config'; import MyOtherComponent from './components/my_component'; let component = (<MyOtherComponent config={config} />); ReactDOM.render(component, document.querySelector('mount')); 而不是react-app-rewired

react-scripts

当我将其推送到heroku时,它无法找到命令。这是为什么?

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

"scripts": {
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test --env=jsdom",
    "eject": "react-scripts eject"
},

1 个答案:

答案 0 :(得分:0)

我的问题是将"react-app-rewired": "^1.4.0"作为"devDependencies"而不是"dependencies"进行制作:)