You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, I am reporting an error in the documentation concerning this section.
In fact, if you follow this tutorial, you modify the "build" script to "build": "react-scripts build && npm run build-css". There is two problems here:
You run react-scripts build before processing sass files. So you may not have the latest version of the css file.
On a CI server, if you start only from the sources from git, you won't have any .css file created so it returns an error (see below).
Expected behavior
The build script should be: npm run build-css && react-scripts build. So it prevents those issues.
Actual behavior
$ react-scripts build && npm run build-css
Creating an optimized production build...
Failed to compile.
Module not found: Error: Cannot resolve 'file' or 'directory' ./index.css
Environment
Run these commands in the project folder and fill in their results:
Description
Hello everyone, I am reporting an error in the documentation concerning this section.
In fact, if you follow this tutorial, you modify the "build" script to
"build": "react-scripts build && npm run build-css"
. There is two problems here:react-scripts build
before processing sass files. So you may not have the latest version of the css file.Expected behavior
The build script should be:
npm run build-css && react-scripts build
. So it prevents those issues.Actual behavior
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected):node -v
: v6.9.0npm -v
: 3.10.8Then, specify:
Reproducible Demo
I just followed the turtorial with a CRA app from scratch.
BTW thank you for documenting this, I'll submit a PR with the little fix attached to this issue.
The text was updated successfully, but these errors were encountered: