yarn command fails in node v12
I bumped into this when building with CircleCi )default php image uses v12)

You can check locally with docker:
sudo service docker start
docker pull circleci/php:7.3-node-browsers
docker run -it circleci/php:7.3-node-browsers /bin/bash
git clone [email protected]:roots/sage.git && cd sage
yarn
now change node-sass version in package.json to version 12 and run yarn again, it will work
Expected behavior: [What you expect to happen]
yarn to install node_modules
Actual behavior: [What actually happens]
Error with node-sass
Reproduces how often: [What percentage of the time does it reproduce?]
100%
Docker image: circleci/php:7.3-node-browsers
Node V12
node-sass ~4.9.4
Check this compatibility chart https://www.npmjs.com/package/node-sass
A quick workaround is:
node_modules folderpackage-lock.json or yarn.locknode-sass dependency from package.json fileyarn | yarn install | npm install in the consoleyarn add node-sass or npm install node-sassThis will make your project work as expected before the fix is submitted.
@alonsoJS this fixed the problem for me. Is there any scope to get this fixed in the official version? Took a bit of digging before I eventually found this fix.
tracking here: #2466
Most helpful comment
A quick workaround is:
node_modulesfolderpackage-lock.jsonoryarn.locknode-sassdependency frompackage.jsonfileyarn | yarn install | npm installin the consoleyarn add node-sassornpm install node-sassThis will make your project work as expected before the fix is submitted.