Coder Social home page Coder Social logo

Update node-gyp to v6.x about cli HOT 8 CLOSED

npm avatar npm commented on September 18, 2024 19
Update node-gyp to v6.x

from cli.

Comments (8)

ljharb avatar ljharb commented on September 18, 2024 2

This is updated in npm 7 to v6 in 09dac89 (and to node-gyp v7 in b3a50d2)

from cli.

dpinol avatar dpinol commented on September 18, 2024

I had to update node-gyp dependency manually to 6.0.1 in one of our mac boxes to avoid the 'TypeError: cannot use a string pattern on a bytes-like object' error:
atom/git-utils#72 (comment)

from cli.

jnardone avatar jnardone commented on September 18, 2024

Also breaks ranisalt/node-argon2#230 at least on MacOS

from cli.

adamjstewart avatar adamjstewart commented on September 18, 2024

I'm trying to install npm 6.13.4 with node-js 13.5.0 and ran into the same Python 3 issue reported in nodejs/node-gyp#1917

I'm installing both node-js and npm from source. I tried replacing node_modules/node-gyp (version 5.0.5) with version 6.0.1 in the npm source tarball, then updated package.json with the new version. Now I'm getting the following error:

> node install

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.9/fse-v1.2.9-node-v79-darwin-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v79 ABI, unknown) (falling back to source compile with node-gyp) 
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
  COPY /private/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-npm-6.13.4-m5vzriomllzvhxm6okvb6oy2zs2nnhus/spack-src/docs/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node
  TOUCH Release/obj.target/action_after_build.stamp

> [email protected] install /private/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-npm-6.13.4-m5vzriomllzvhxm6okvb6oy2zs2nnhus/spack-src/docs/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Using cached /Users/Adam/.npm/_libvips/libvips-8.7.4-darwin-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=13.5.0 runtime=node arch=x64 libc= platform=darwin)
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
  CXX(target) Release/obj.target/sharp/src/metadata.o
  CXX(target) Release/obj.target/sharp/src/stats.o
../src/stats.cc:130:19: error: no matching member function for call to 'Set'
        channels->Set(i, channelStat);
        ~~~~~~~~~~^~~
/Users/Adam/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/Adam/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
1 error generated.
make[1]: *** [Release/obj.target/sharp/src/stats.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/private/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-npm-6.13.4-m5vzriomllzvhxm6okvb6oy2zs2nnhus/spack-src/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:305:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/Users/Adam/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/node-js-13.5.0-k6hflaned2pgrkezljfpgsjy2hgkrgfe/bin/node" "/private/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-npm-6.13.4-m5vzriomllzvhxm6okvb6oy2zs2nnhus/spack-src/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-npm-6.13.4-m5vzriomllzvhxm6okvb6oy2zs2nnhus/spack-src/docs/node_modules/sharp
gyp ERR! node -v v13.5.0
gyp ERR! node-gyp -v v6.0.1
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Adam/.npm/_logs/2019-12-20T02_40_06_941Z-debug.log
make: *** [htmldocs] Error 1

Am I doing something wrong? Very new to node, just need it as a dependency of a dependency.

from cli.

adamjstewart avatar adamjstewart commented on September 18, 2024

Hmm, looks like the version of sharp may need to be updated to support node.js 13: lovell/sharp#2005

from cli.

rvagg avatar rvagg commented on September 18, 2024

Re node-gyp v5 and v6 and the suggestion here that this is caused by not having 6 (it's not, and it's not that simple): nodejs/node-gyp#1917 (comment)

Also, you can help us fix this if you're experiencing this problem. See link.

from cli.

binury avatar binury commented on September 18, 2024

Posting here for anything troubleshooting installing deps without a pre-built binary available:
In the meantime you can manually update node-gyp https://github.com/nodejs/node-gyp/wiki/Updating-npm's-bundled-node-gyp

from cli.

cekvenich avatar cekvenich commented on September 18, 2024

This bug is causing issues in 3 upstream packages I use. And it is not just OSX, it is all of linux. Title should be updated to include linux.

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.