Sage: node-sass fails with node v12

Created on 26 Feb 2020  路  4Comments  路  Source: roots/sage

Description

yarn command fails in node v12

I bumped into this when building with CircleCi )default php image uses v12)

image

Steps to reproduce

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%

Versions

Docker image: circleci/php:7.3-node-browsers
Node V12
node-sass ~4.9.4

Additional information

Check this compatibility chart https://www.npmjs.com/package/node-sass

Most helpful comment

A quick workaround is:

  • Remove node_modules folder
  • Remove package-lock.json or yarn.lock
  • Remove node-sass dependency from package.json file
  • Run yarn | yarn install | npm install in the console
  • Run yarn add node-sass or npm install node-sass

This will make your project work as expected before the fix is submitted.

All 4 comments

A quick workaround is:

  • Remove node_modules folder
  • Remove package-lock.json or yarn.lock
  • Remove node-sass dependency from package.json file
  • Run yarn | yarn install | npm install in the console
  • Run yarn add node-sass or npm install node-sass

This 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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

swalkinshaw picture swalkinshaw  路  6Comments

ajoah picture ajoah  路  4Comments

emilsgulbis picture emilsgulbis  路  6Comments

evertsemeijn picture evertsemeijn  路  3Comments

buckedup picture buckedup  路  3Comments