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

I wanna import sass in my react-app, I follow the user guide and found if I don't new a .scss file in project, npm start will cause wrong. #2380

Closed
TomIsion opened this issue May 27, 2017 · 5 comments

Comments

@TomIsion
Copy link

Description

I follow the user guide, wanna import sass in my project. After I change the npm scripts settings in package.json, I didn't new a .scss file in my project. Then npm start caused error.

> react-list@0.1.0 build-css /Users/tom/Work/React/react-list
> node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/

No input file was found.

npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/Cellar/node/7.5.0/bin/node" "/usr/local/bin/npm" "run" "build-css"
npm ERR! node v7.8.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-list@0.1.0 build-css: `node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/`

But I new a .scss in src folder it works well. No errors anymore.

Expected behavior

I wanna even if I don't new a .scss file then npm start won't cause wrong.

Environment

As the wrong info shows.

Then, specify:

  1. Operating system:
  2. Browser and version:

Mac OSX

@Timer
Copy link
Contributor

Timer commented May 27, 2017

/cc @michaelwayman

@michaelwayman
Copy link
Contributor

@TomIsion I have raised this issue with node-sass-chokidar.
You can find it here

I am able to reproduce the issue, basically when there are no .scss files in the ./src folder the command you are running will throw a warning saying there are no input files, but then also throws an npm error. I'm assuming the behavior you were expecting was to get the warning without the npm error. I should be able to fix this this weekend, thanks for reporting this.

@TomIsion
Copy link
Author

👍

@michaelwayman
Copy link
Contributor

This issue has been resolved with the latest PATCH version of node-sass-chokidar.
Instead of raising an error, it now prints a simple warning saying to input files can be found.
@TomIsion
@Timer I think this can be closed.

@gaearon gaearon closed this as completed May 27, 2017
@gaearon
Copy link
Contributor

gaearon commented May 27, 2017

Awesome, thanks for followup!

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

No branches or pull requests

4 participants