当我尝试在heroku上部署MERN(使用MySQL)堆栈应用程序时,出现以下错误。我已经在我的Heroku应用程序中将JawsDB添加为插件。错误如下
Build
Running heroku-postbuild
> project-3@0.0.0 heroku-postbuild /tmp/build_7ec157c3d9bef60bfe3c7c57381d9362
> NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client
audited 939983 packages in 16.414s
found 9 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
> project-3-react@0.1.0 build /tmp/build_7ec157c3d9bef60bfe3c7c57381d9362/client
> react-scripts build
Creating an optimized production build...
Failed to compile.
./src/pages/MyTripPagePage/MyTripPagePage.styles.scss
Error: Missing binding /tmp/build_7ec157c3d9bef60bfe3c7c57381d9362/client/node_modules/node-sass/vendor/linux-x64-72/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 12.x
Found bindings for the following environments:
- OS X 64-bit with Node.js 12.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project-3-react@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project-3-react@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! /tmp/npmcache.0lTpz/_logs/2019-12-07T21_45_18_589Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project-3@0.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 project-3@0.0.0 heroku-postbuild 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! /tmp/npmcache.0lTpz/_logs/2019-12-07T21_45_18_605Z-debug.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Some possible problems:
- node_modules checked into source control
https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
- Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed