I have a node app that has been live on Heroku for a year, but the last update is now crashing on build. I haven't seen this error before and can't find any help.
Here is the error log:
yarn run v1.12.3
$ react-scripts build
Creating an optimized production build...
Failed to compile.
./src/components/Admin_Navigation/navigation.css
Module build failed: Error: Unexpected "space" found.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] heroku-postbuild: `yarn build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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.22xgq/_logs/2018-11-22T00_36_38_522Z-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:
- Dangerous semver range (>) in engines.node
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
I've tried the following:
Any of your thoughts are appreciated. Thanks
Update: this is caused by an unnecessary space in CSS. You can manually look through the CSS for the space, or a less optimal solution is to roll back Node to a version that is less syntax-rigid.
I faced a similar problem to this, what helped me was to go line by line in searching for the problem, and in the end it was an unintended space between :
and hover
in the CSS file that was causing the problem.
It was surprising since that code I never changed and it was working before but the solution was to actually find the space being talked about in my CSS file.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments