Open dnp87 opened 5 years ago
I got this too. It seems to be a Windows thing.
It looks like the yarn/npm run
script uses the OS default shell to interpret the script
commands in package.json, even if you invoke yarn run
in a different shell such as git bash. On Windows, that would be cmd, so there are a few bash-isms that wouldn't work properly on Windows.
For example, the build-sass
script runs node-sass --include-path='node_modules' src/css/index.scss src/index.css
. On Windows, I think what's happening is that cmd interprets the single quotes as literal quotes. So node-sass tries to look in the path 'node_modules'
(with single quotes) which doesn't exist, and that's why it's not finding the chartist scss files.
This also means the HTTPS=true
in the start
script wouldn't work (in Windows cmd, the equivalent would be something like set HTTPS=true
), and the &
for background process wouldn't work either.
tl;dr For the time being, my hacky workaround is to remove the single quotes from the start-sass
and build-sass
scripts in package.json, and to change the start
script to yarn run build-sass && start /B yarn run start-sass && set HTTPS=true&& react-scripts start
.
Greetings. I am getting the output following. Changing import in question to "@import " node_modules/ chartist/dist/scss/chartist" fixes an error, but I'm not sure it should be necessary. Am I doing something wrong?