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

This is a bug in node-pre-gyp. - Failed at the canvas@2.6.1 install script. #525

Open
ghost opened this issue Nov 23, 2020 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Nov 23, 2020

PS C:\Users\arti\Desktop\Alrigt\cheeto> npm i -g  node-pre-gyp@latest
C:\Users\arti\AppData\Roaming\npm\node-pre-gyp -> C:\Users\arti\AppData\Roaming\npm\node_modules\node-pre-gyp\bin\node-pre-gyp
+ node-pre-gyp@0.16.0
updated 2 packages in 6.763s
PS C:\Users\arti\Desktop\Alrigt\cheeto> npm i canvas

> canvas@2.6.1 install C:\Users\arti\Desktop\Alrigt\cheeto\node_modules\canvas
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! UNCAUGHT EXCEPTION 
node-pre-gyp ERR! stack Error: EPERM: operation not permitted, read
node-pre-gyp ERR! stack     at Object.readSync (fs.js:592:3)
node-pre-gyp ERR! stack     at tryReadSync (fs.js:366:20)
node-pre-gyp ERR! stack     at Object.readFileSync (fs.js:395:19)
node-pre-gyp ERR! stack     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1090:18)
node-pre-gyp ERR! stack     at Module.load (internal/modules/cjs/loader.js:928:32)
node-pre-gyp ERR! stack     at Function.Module._load (internal/modules/cjs/loader.js:769:14)
node-pre-gyp ERR! stack     at Module.require (internal/modules/cjs/loader.js:952:19)
node-pre-gyp ERR! stack     at require (internal/modules/cjs/helpers.js:88:18)
node-pre-gyp ERR! stack     at Object.<anonymous> (C:\Users\arti\Desktop\Alrigt\cheeto\node_modules\needle\lib\needle.js:17:19)
node-pre-gyp ERR! stack     at Module._compile (internal/modules/cjs/loader.js:1063:30)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\arti\\Desktop\\Alrigt\\cheeto\\node_modules\\canvas\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\arti\Desktop\Alrigt\cheeto\node_modules\canvas
node-pre-gyp ERR! node -v v14.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR!     <https://github.com/mapbox/node-pre-gyp/issues>
npm WARN testtbot@1.0.0 No description
npm WARN testtbot@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! canvas@2.6.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the canvas@2.6.1 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!     C:\Users\arti\AppData\Roaming\npm-cache\_logs\2020-11-23T22_58_16_054Z-debug.log
PS C:\Users\arti\Desktop\Alrigt\cheeto>

i can't find any solutions to this error

additional info: this happens when i try to intall things like such as sqlite\better-sqlite\quick.db\ discordjs/opus

@mattficke
Copy link

@NICK42069 this looks similar to an issue with the needle dependency that was resolved in version 2.5.0 (#500). Recent versions of node-pre-gyp include this update, but canvas hasn't published a version that includes this yet.

Can you try either removing your package-lock.json file and reinstalling (node-pre-gyp uses a loose semver range for the needle dependency, but it might be pinned in your lockfile), or installing a version of needle >= 2.5.0 in your own project's dependencies to see if this fixes the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant