Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Mistake in adding CSS Preprocessor documentation #1548

Closed
KevinBacas opened this issue Feb 13, 2017 · 1 comment
Closed

Mistake in adding CSS Preprocessor documentation #1548

KevinBacas opened this issue Feb 13, 2017 · 1 comment

Comments

@KevinBacas
Copy link

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:

  • 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:

  1. npm ls react-scripts (if you haven’t ejected):
my-app@0.1.0 C:\Users\Kevbac\Documents\git\my-app
`-- react-scripts@0.9.0
  1. node -v: v6.9.0
  2. npm -v: 3.10.8

Then, specify:

  1. Operating system: Windows 10
  2. Browser and version:

Reproducible Demo

I just followed the turtorial with a CRA app from scratch.

git clone https://github.com/KevinBacas/my-app
cd my-app
npm install

npm run build # This will throw an error

BTW thank you for documenting this, I'll submit a PR with the little fix attached to this issue.

@KevinBacas KevinBacas changed the title Error in adding CSS Preprocessor documentation Mistake in adding CSS Preprocessor documentation Feb 13, 2017
@KevinBacas
Copy link
Author

Fixed just here: ce0d6ee

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant