-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
when install using npm 8.x, node-gyp rebuild runs instead of node-pre-gyp, so prebuilt binaries are not downloaded #2082
Comments
I had the same problem |
npm/cli#5234. It seems if there is a binding.gyp file in the root dir, npm always runs the default install command node-gyp rebuild. Renaming or removing binding.gyp after the prebuild may be a workaround so the binaries are downloaded as they used to be with npm 6. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
My npm version is 8.12.1 and "npm i canvas" runs "node-pre-gyp install --fallback-to-build --update-binary" however the install fails as below. How can I install canvas? PS. I already had canvas on my node_modules, I installed with multiple times. Today I cleared the node_modules folder and installed all packages again, only I had issue with canvas. I don't know what could have been changed?
|
Same issue here. I run npm install --buil-from-source. info run canvas@2.9.3 install node_modules/canvas node-pre-gyp install --fallback-to-build --update-binary |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
@zhangxiaoshang @Xyvyrianeth those are different issues (#2025) than this one. |
Issue or Feature
When using npm 6, the install runs
node-pre-gyp
to download prebuilt binaries as expected and the install is successful.When using npm 8, the install runs
node-gyp
which attempts to rebuild the binaries and the install fails because pkg-config is not available.We want to download the prebuilt binaries, not rebuild them. What is needed to have
node-pre-gyp
run with npm 8?Steps to Reproduce
App package.json contains only canvas as a dependency to make it as simple as possible:
Ensure starting from scratch:
rm -rf node_modules
rm package-lock.json
npm 6 install successful: npm install runs
node-pre-gyp install --fallback-to-build --update-binary
npm 8 install failure: npm install runs
node-gyp rebulld
instead ofnode-pre-gyp install --fallback-to-build --update-binary
:Your Environment
macOS 12.4
System Darwin 21.5.0
node -v v16.16.0
npm -v 8.15.0
"canvas": "^2.9.3"
The text was updated successfully, but these errors were encountered: