Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

css background: linear-gradient variable error in building process #4013

Closed
phc284 opened this issue Feb 12, 2018 · 1 comment
Closed

css background: linear-gradient variable error in building process #4013

phc284 opened this issue Feb 12, 2018 · 1 comment

Comments

@phc284
Copy link

phc284 commented Feb 12, 2018

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

  1. node -v: 8.9.1
  2. npm -v: 5.6.0
  3. yarn --version (if you use Yarn):
  4. npm ls react-scripts (if you haven’t ejected):

Then, specify:

  1. Operating system: MacOS High Sieraa
  2. Browser and version (if relevant): Chrome, Safari, Firefox (all most updated)

Steps to Reproduce

(Write your steps here:)

  1. Enter code background: linear-gradient(to var(--direction, left), var(--navyblue), transparent); in a css style
  2. 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

  1. Traverse into client -> src -> `components' folders
  2. On line 207 fpr .websites-layout h2:before, .websites-layout h2:after there is a line of code for background: linear-gradient(to var(--direction, left), var(--navyblue), transparent);
  3. The variable --direction is set in the next css style on line 212
  4. When the snippet var(--direction, left) is included in the code, the build will fail
  5. 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>
  1. I believe you should be able to reproduce this if you delete all the contents in homepage.css and only put in a style for background: linear-gradient(to var(--direction, left), var(--navyblue), transparent);
@stale
Copy link

stale bot commented Nov 2, 2018

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs.

@stale stale bot added the stale label Nov 2, 2018
@Timer Timer closed this as completed Nov 2, 2018
@lock lock bot locked and limited conversation to collaborators Jan 9, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants