【发布时间】:2021-01-11 00:50:26
【问题描述】:
我对 Heroku 还很陌生,我在尝试从 github 进行自动构建时遇到了问题。 A 之前通过 cli 执行过构建,但我希望消除该步骤并让 heroku 直接从 github 获取更新。
为了使事情复杂化,我使用的是我购买的模板,因此发生的事情比我以前看到的要多。任何帮助将不胜感激。
npm ERR! node_modules/@material-ui/core
npm ERR! @material-ui/core@"^4.9.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @material-ui/core@"4.0.1" from material-table@1.69.2
这是heroku日志中的错误。
-----> Installing binaries
engines.node (package.json): 15.5.0
engines.npm (package.json): unspecified (use default)
engines.yarn (package.json): 1.22.10
Resolving node version 15.5.0...
Downloading and installing node 15.5.0...
Using default npm version: 7.3.0
Resolving yarn version 1.22.10...
Downloading and installing yarn (1.22.10)
Installed yarn 1.22.10
我可以看到它正在从我的“引擎”条目中获取值。这些符合我的开发设置。 'npm' 是否表明它没有使用纱线?我在本地使用 yarn,有一个 yarn.lock 文件。
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
这是 package.json 的脚本区。
【问题讨论】:
-
我确实在这方面取得了一些进展。大多数导致问题的库都是次要的,并由模板的制造商包含在 package.json 中。仍在浏览它们。
标签: reactjs heroku build dependencies