【发布时间】:2021-04-22 09:30:10
【问题描述】:
- 上一个版本正在运行,并且此版本中只有 UI 更改。
- 我只更改了我正在使用的设备,所以可能我忘记下载了。
- 我不知道为什么这不起作用。
- 无论如何我都没能解决这个问题。
"node-sass": "^5.0.0",
构建日志的第一部分:
-----> Building on the Heroku-20 stack
-----> Using buildpack: mars/create-react-app
-----> React.js (create-react-app) multi app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-multi.git
=====> Detected Framework: Multipack
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): >=10
engines.npm (package.json): >=6
Resolving node version >=10...
Downloading and installing node 16.0.0...
Bootstrapping npm >=6 (replacing 7.10.0)...
npm >=6 installed
-----> Installing dependencies
Installing node modules
npm ERR! code 1
npm ERR! path /tmp/build_a9056f2a/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /tmp/build_a9056f2a/.heroku/node/bin/node /tmp/build_a9056f2a/node_modules/node-gyp/bin/node-gyp.js
【问题讨论】:
-
一年前我也遇到过类似的问题,我通过在依赖项而不是 dev 依赖项中安装 node-sass 解决了这个问题。这是/也许是一种解决方法,但它对我有用。