Closed
Description
Is this a bug report?
Yes
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
css and stylesheet
Environment
node -v
: 8.9.1npm -v
: 5.6.0yarn --version
(if you use Yarn):npm ls react-scripts
(if you haven’t ejected):
Then, specify:
- Operating system: MacOS High Sieraa
- Browser and version (if relevant): Chrome, Safari, Firefox (all most updated)
Steps to Reproduce
(Write your steps here:)
- Enter code
background: linear-gradient(to var(--direction, left), var(--navyblue), transparent);
in a css style - run npm build or deploy to heroky and receive error
Expected Behavior
I thought it should have built correctly as the development server showed the css behavior correctly.
Actual Behavior
Build Error was found from the steps below
Reproducible Demo
Reproducing steps from my broken branch in github: HERE
- Traverse into
client
->src
-> `components' folders - On line 207 fpr
.websites-layout h2:before, .websites-layout h2:after
there is a line of code forbackground: linear-gradient(to var(--direction, left), var(--navyblue), transparent);
- The variable
--direction
is set in the next css style on line 212 - When the snippet
var(--direction, left)
is included in the code, the build will fail - Running npm run build in the
client
folder or deploying to heroku will both produce the error:
./src/components/info.css
Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot read property 'length' of undefined
at Array.forEach (<anonymous>)
at <anonymous>
- I believe you should be able to reproduce this if you delete all the contents in
homepage.css
and only put in a style forbackground: linear-gradient(to var(--direction, left), var(--navyblue), transparent);