mapbox / mapbox/node-pre-gyp

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

Open
#525 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.2k
Forks
271
Avg merge
23h 40m
Merged PRs (30d)
2

Description

```
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. (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!
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 `

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing `npm i canvas` on Windows with Node.js v14.15.0 and node-pre-gyp, then inspect the reported `needle\lib\needle.js` stack and EPERM read failure. Compare the same install behavior for the other native packages mentioned. Done means the Windows installation failure is explained and a validated resolution is documented or implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.