Comments (8)
This is updated in npm 7 to v6 in 09dac89 (and to node-gyp v7 in b3a50d2)
from cli.
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.
Also breaks ranisalt/node-argon2#230 at least on MacOS
from cli.
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.
Hmm, looks like the version of sharp may need to be updated to support node.js 13: lovell/sharp#2005
from cli.
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.
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.
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)
- [BUG] <prepare script called with CMD on windows> HOT 1
- Feature request: Add config option to prevent accidental installation of packages in directories without package.json HOT 2
- [BUG] npm publish <package-spec> in a workspace is not taking package-spec into account HOT 1
- [BUG] package binaries with .hidden folders don't install globally HOT 1
- [BUG] No lifecycle hooks are run at all HOT 3
- [BUG] `npm update -g ds` removes all global packages and npm itself HOT 3
- [BUG] DevDependancy are installed in production when also marked as peerDependenciesMeta optional HOT 3
- [question] Whether it is possible to upload to npmjs.org manually? HOT 1
- [BUG] `npm outdated --json` doesn't provide distinct workspace packages information HOT 1
- [BUG] git dependencies cause weird behaviour when git is not installed HOT 1
- [BUG] DevDependancy are installed in production when also marked as optional peerDependencies HOT 8
- [BUG] outdated does not report packages in unnamed workspaces HOT 1
- [BUG] Inconsistent audit json HOT 3
- [BUG] `npm i` does not set `["packages"][""]["name"]` in package-lock.json when there is no name in package.json while `npm audit fix` sets that to project's directory name HOT 7
- [BUG] `npm install` sometimes removes indirect dependencies if a parent node was deleted from the lockfile HOT 2
- [BUG] The .gitignore file is renamed to .npmignore when npm install HOT 2
- [BUG] The package-lock.json file depends on node_modules, which will cause the lock generated by npm i to be inconsistent after the lock file is deleted when some packages that depend on the system architecture (such as node-unix-socket) are installed again. HOT 3
- Start HOT 1
- [BUG] Project name was being added to dependencies automatically HOT 7
- Align npm packages to npm 10's node engine range
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.