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

Build failure on Node 12.3.1 #1763

Closed
robd003 opened this issue May 29, 2019 · 31 comments
Closed

Build failure on Node 12.3.1 #1763

robd003 opened this issue May 29, 2019 · 31 comments
Labels
ERR! node-gyp -v < v10.x.x npm install -g npm Node Sass --> Dart Sass https://github.com/sass/node-sass/issues/2952 wrong repo

Comments

@robd003
Copy link

robd003 commented May 29, 2019

  • Node Version: node: v12.3.1 npm: 6.9.0
  • Platform: Darwin 18.6.0 Darwin Kernel Version 18.6.0
  • Compiler: Apple LLVM version 10.0.1 (clang-1001.0.46.4)
    Target: x86_64-apple-darwin18.6.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
  • Module: node-gyp
c++ '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/Users/robd/.node-gyp/12.3.1/include/node -I/Users/robd/.node-gyp/12.3.1/src -I/Users/robd/.node-gyp/12.3.1/deps/openssl/config -I/Users/robd/.node-gyp/12.3.1/deps/openssl/openssl/include -I/Users/robd/.node-gyp/12.3.1/deps/uv/include -I/Users/robd/.node-gyp/12.3.1/deps/zlib -I/Users/robd/.node-gyp/12.3.1/deps/v8/include -I../../nan -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-exceptions -std=c++11 -MMD -MF ./Release/.deps/Release/obj.target/binding/src/create_string.o.d.raw -c -o Release/obj.target/binding/src/create_string.o ../src/create_string.cpp ../src/create_string.cpp:17:25: error: no matching constructor for initialization of 'v8::String::Utf8Value' v8::String::Utf8Value string(value); ^ ~~~~~ /Users/robd/.node-gyp/12.3.1/include/node/v8.h:3002:5: note: candidate constructor not viable: no known conversion from 'v8::Local' to 'const v8::String::Utf8Value' for 1st argument Utf8Value(const Utf8Value&) = delete; ^ /Users/robd/.node-gyp/12.3.1/include/node/v8.h:2995:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided Utf8Value(Isolate* isolate, Local obj); ^ 1 error generated. make: *** [Release/obj.target/binding/src/create_string.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/robd/code/voxsnap-v2/assets/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:200:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Darwin 18.6.0 gyp ERR! command "/usr/local/Cellar/node/12.3.1/bin/node" "/Users/robd/code/voxsnap-v2/assets/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /Users/robd/code/voxsnap-v2/assets/node_modules/node-sass gyp ERR! node -v v12.3.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1
23632 verbose stack Error: node-sass@4.11.0 postinstall: `node scripts/build.js`
23632 verbose stack Exit status 1
23632 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
23632 verbose stack     at EventEmitter.emit (events.js:200:13)
23632 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
23632 verbose stack     at ChildProcess.emit (events.js:200:13)
23632 verbose stack     at maybeClose (internal/child_process.js:1021:16)
23632 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
23633 verbose pkgid node-sass@4.11.0
23634 verbose cwd /Users/robd/code/voxsnap-v2/assets
23635 verbose Darwin 18.6.0
23636 verbose argv "/usr/local/Cellar/node/12.3.1/bin/node" "/usr/local/bin/npm" "install"
23637 verbose node v12.3.1
23638 verbose npm  v6.9.0
23639 error code ELIFECYCLE
23640 error errno 1
23641 error node-sass@4.11.0 postinstall: `node scripts/build.js`
23641 error Exit status 1
23642 error Failed at the node-sass@4.11.0 postinstall script.
23642 error This is probably not a problem with npm. There is likely additional logging output above.
23643 verbose exit [ 1, true ]
@richardlau
Copy link
Member

23632 verbose stack Error: node-sass@4.11.0 postinstall: `node scripts/build.js`

You need node-sass@4.12.0 for Node.js 12 support: https://github.com/sass/node-sass/releases/tag/v4.12.0

@etonyali
Copy link

23632 verbose stack Error: node-sass@4.11.0 postinstall: `node scripts/build.js`

You need node-sass@4.12.0 for Node.js 12 support: https://github.com/sass/node-sass/releases/tag/v4.12.0

Do you install this globally? Because I added to my dependency/dev-dependency in package.json but I still get the same error :/

@lukaszszafranski
Copy link

For me, the only way around this issue was to downgrade node.js version to 10.

@EuclidesJr
Copy link

Same issue with node v13.5.0. Do I need to downgrade my node installation?

@tr-abymathew
Copy link

node v12.16.1 also failed. Going to try with version 10

@tr-abymathew
Copy link

node v10.19.0 worked for me.

@szy0syz
Copy link

szy0syz commented Mar 2, 2020

Same issue with me, v12.x~13.x.
switch to v10.17.0 is ok 🤔🤔

@sdiemert
Copy link

sdiemert commented Mar 5, 2020

Seeing this issue on node v13.5.0.

@ar-international
Copy link

Wow, why this issue is present for almost a year now and not addressed?

@rvagg
Copy link
Member

rvagg commented Mar 6, 2020

@ar-international because we've been waiting for you to appear and show us the way!

Seriously though, this is not a node-gyp problem, no need to continue commenting here as there's nothing we can do about it. Go and talk to node-sass about compatibility and figure out which version of Node is compatible with the version of node-sass you want to use, or the vice versa.

@cweiske
Copy link

cweiske commented Mar 20, 2020

node-sass says it's not their fault sass/node-sass#2794

silvae86 added a commit to feup-infolab/archgraph that referenced this issue Apr 11, 2020
had to downgrade to node 10 because of node-gyp issues
nodejs/node-gyp#1763
@thaycacac
Copy link

npm install -g --unsafe-perm node-sass --save work for me

shankari added a commit to shankari/e-mission-phone that referenced this issue May 10, 2020
This involved two fixes:
- recreating the config on resume so that the end date is reset (`list.js`), and
- setting "today" to the correct date when the datepicker is opened
    (`ionic-datepicker.bundle.min.js`)

I have also added build instructions to my fork of the ionic-datepicker repo,
but in case I delete the fork later, the instructions are:

Install node 10.19.0 ([gulp-sass will fail for more recent version of node](nodejs/node-gyp#1763))

```
node -v
v10.19.0
```

Install and check gulp version

```
npm install
npm list | grep gulp
├─┬ gulp@3.9.0
```

Build

```
npx gulp build
```

Testing done:
Followed the steps in e-mission/e-mission-docs#531 (comment)
Both end date and today are updated correctly
shankari added a commit to shankari/e-mission-phone that referenced this issue May 10, 2020
This involved two fixes:
- recreating the config on resume so that the end date is reset (`list.js`), and
- setting "today" to the correct date when the datepicker is opened
    (`ionic-datepicker.bundle.min.js`)

I have also added build instructions to my fork of the ionic-datepicker repo,
but in case I delete the fork later, the instructions are:

Install node 10.19.0 ([gulp-sass will fail for more recent version of node](nodejs/node-gyp#1763))

```
node -v
v10.19.0
```

Install and check gulp version

```
npm install
npm list | grep gulp
├─┬ gulp@3.9.0
```

Build

```
npx gulp build
```

Testing done:

Followed the steps in e-mission/e-mission-docs#531 (comment)
Both end date and today are updated correctly
shankari added a commit to shankari/e-mission-phone that referenced this issue May 10, 2020
This involved two fixes:
- recreating the config on resume so that the end date is reset (`list.js`), and
- setting "today" to the correct date when the datepicker is opened
    (`ionic-datepicker.bundle.min.js`)

I have also added build instructions to my fork of the ionic-datepicker repo,
but in case I delete the fork later, the instructions are:

Install node 10.19.0 ([gulp-sass will fail for more recent version of node](nodejs/node-gyp#1763))

```
node -v
v10.19.0
```

Install and check gulp version

```
npm install
npm list | grep gulp
├─┬ gulp@3.9.0
```

Build

```
npx gulp build
```

Testing done:

Followed the steps in e-mission/e-mission-docs#531 (comment)
Both end date and today are updated correctly
asiripanich pushed a commit to rciti/e-mission-phone that referenced this issue May 10, 2020
This involved two fixes:
- recreating the config on resume so that the end date is reset (`list.js`), and
- setting "today" to the correct date when the datepicker is opened
    (`ionic-datepicker.bundle.min.js`)

I have also added build instructions to my fork of the ionic-datepicker repo,
but in case I delete the fork later, the instructions are:

Install node 10.19.0 ([gulp-sass will fail for more recent version of node](nodejs/node-gyp#1763))

```
node -v
v10.19.0
```

Install and check gulp version

```
npm install
npm list | grep gulp
├─┬ gulp@3.9.0
```

Build

```
npx gulp build
```

Testing done:

Followed the steps in e-mission/e-mission-docs#531 (comment)
Both end date and today are updated correctly
asiripanich pushed a commit to rciti/e-mission-phone that referenced this issue May 10, 2020
This involved two fixes:
- recreating the config on resume so that the end date is reset (`list.js`), and
- setting "today" to the correct date when the datepicker is opened
    (`ionic-datepicker.bundle.min.js`)

I have also added build instructions to my fork of the ionic-datepicker repo,
but in case I delete the fork later, the instructions are:

Install node 10.19.0 ([gulp-sass will fail for more recent version of node](nodejs/node-gyp#1763))

```
node -v
v10.19.0
```

Install and check gulp version

```
npm install
npm list | grep gulp
├─┬ gulp@3.9.0
```

Build

```
npx gulp build
```

Testing done:

Followed the steps in e-mission/e-mission-docs#531 (comment)
Both end date and today are updated correctly
@Att4ck3rS3cur1ty
Copy link

Att4ck3rS3cur1ty commented May 13, 2020

In v14.2.0, I was facing the same exact issue, the log errors were the same way. Steps for what I did:

1 - downgrade node to its current stable version, which corresponds to v12.16.3 at the moment;

2 - verified with yarn command that node was still breaking it (and I should've tried the step 4 before proceeding. Do so!);

3 - then I tried @thaycacac's suggestion and after I ran yarn, but it was breaking yet;

4 - so I ran rm -rf node_modules/, rm yarn.lock, rm package-lock.json;

5 - finally I ran yarn again and it worked. Node doesn't break anymore (for now).

@iamforrest
Copy link

  1. rm -fr node_modules/*
  2. npm install node-sass --save-dev
  3. npm install

the problem is solved for me.

@asoradoi
Copy link

re-installing node_modules/node-sass didn't not do the trick
downgrading to node v10 worked

@lisilinhart
Copy link

For me it was enough to install an older version of node-sass npm install node-sass@4.12.0 --save

node -v
v14.2.0

npm -v
6.14.4

@mauroviniciussilva
Copy link

mauroviniciussilva commented Jun 30, 2020

npm install -g --unsafe-perm node-sass --save

worked for me (node v12.15.0)

@edsonhoraciojunior
Copy link

As some have commented here already, the fix for me was downgrading from node 12 to 10 latest release, which is 10.21.0 as of now, I did it using NVM which makes it so simple.

@cclauss
Copy link
Contributor

cclauss commented Jul 1, 2020

@xzyfer @nschonni Can you please advise us on this closed issue? Above many users are suggesting installing node-sass requires downgrading their Node.js versions yet node-sass testing covers all current Node.js releases.

@nschonni
Copy link
Member

nschonni commented Jul 1, 2020

Compatible versions are listed at the top of the readme https://github.com/sass/node-sass#supported-nodejs-versions-vary-by-release-please-consult-the-releases-page-below-is-a-quick-guide-for-minimum-support
We don't backport support to older releases

@bjspatel
Copy link

bjspatel commented Sep 20, 2020

  1. rm -fr node_modules/*
  2. npm install node-sass --save-dev
  3. npm install

the problem is solved for me.

Thanks @iamforrest
In the second step, this solved for me.
npm install node-sass@latest --save-dev

@m3di
Copy link

m3di commented Oct 19, 2020

node v12.18.4 (stable) and still have the issue

@m3di
Copy link

m3di commented Oct 19, 2020

downgrading node to 10.22.1 did the trick:

  • sudo npm install -g n
  • sudo n 10
  • PATH="$PATH"
  • yarn or npm i

@ingria
Copy link

ingria commented Nov 22, 2020

Still having this issue on node 15 and 14

@cclauss
Copy link
Contributor

cclauss commented Nov 22, 2020

Which version of Node-saas? https://github.com/sass/node-sass#node-sass

@ingria
Copy link

ingria commented Nov 22, 2020

Uh, seems like I hurried to write the comment. The problem was in another package with old node-sass dependency (3.x). Sorry 👐

@gaurav9822
Copy link

re-installing node_modules/node-sass didn't not do the trick
downgrading to node v10 worked

Yes. After trying everything, downgrade to node v10 only works. Thanks!

@RavenHursT
Copy link

I was working w/ an old project that used nwb for script-running.. I uninstalled nwb-sass and it's working fine now

@itsHarshad
Copy link

Instead of trying to downgrade node version I followed these steps:
Stackoverflow Link

Give it a shot! It worked for me.

@amansadhwani
Copy link

I removed this package from package,json file ie "press": "^0.1.1"
And than tried building worked fine thereafter.

@vinojini0322
Copy link

vinojini0322 commented Sep 6, 2021

After spending hours I just downgraded the node v10. It worked for me.

@nodejs nodejs locked as resolved and limited conversation to collaborators Sep 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ERR! node-gyp -v < v10.x.x npm install -g npm Node Sass --> Dart Sass https://github.com/sass/node-sass/issues/2952 wrong repo
Projects
None yet
Development

No branches or pull requests