-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Issue or Feature
- If this is an issue with installation, I have read the troubleshooting guide.
warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^7.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^7.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^6.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^7.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^6.0.1"
warning captcha-canvas > canvas > @mapbox/node-pre-gyp > rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
warning captcha-canvas > canvas > @mapbox/node-pre-gyp > npmlog@5.0.1: This package is no longer supported.
warning captcha-canvas > canvas > @mapbox/node-pre-gyp > rimraf > glob@7.2.3: Glob versions prior to v9 are no longer supported
warning captcha-canvas > canvas > @mapbox/node-pre-gyp > npmlog > gauge@3.0.2: This package is no longer supported.
warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^6.0.1"
warning captcha-canvas > canvas > @mapbox/node-pre-gyp > npmlog > are-we-there-yet@2.0.0: This package is no longer supported.
warning captcha-canvas > canvas > @mapbox/node-pre-gyp > rimraf > glob > inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^6.0.1"
[3/5] Fetching packages...
warning Pattern ["string-width@^4.1.0"] is trying to unpack in the same destination "C:\\Users\\Graham\\AppData\\Local\\Yarn\\Cache\\v6\\npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity\\node_modules\\string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
[1/2] ⠁ canvas
error E:\Programming\Typescript\fiftyone\node_modules\captcha-canvas\node_modules\canvas: Command failed.
Exit code: 7
Command: node-pre-gyp install --fallback-to-build --update-binary
Arguments:
Directory: E:\Programming\Typescript\fiftyone\node_modules\captcha-canvas\node_modules\canvas
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@1.0.11
node-pre-gyp info using node@22.2.0 | win32 | x64
(node:29036) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v127-win32-unknown-x64.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v127-win32-unknown-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for canvas@2.11.2 and node@22.2.0 (node-v127 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v127-win32-unknown-x64.tar.gz
node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack Error: spawn EINVAL
node-pre-gyp ERR! stack at ChildProcess.spawn (node:internal/child_process:421:11)
node-pre-gyp ERR! stack at Object.spawn (node:child_process:760:9)
node-pre-gyp ERR! stack at module.exports.run_gyp (E:\Programming\Typescript\fiftyone\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:80:18)
node-pre-gyp ERR! stack at build (E:\Programming\Typescript\fiftyone\node_modules\@mapbox\node-pre-gyp\lib\build.js:41:13)
node-pre-gyp ERR! stack at self.commands.<computed> [as build] (E:\Programming\Typescript\fiftyone\node_modules\@mapbox\node-pre-gyp\lib\node-pre-gyp.js:86:37)
node-pre-gyp ERR! stack at run (E:\Programming\Typescript\fiftyone\node_modules\@mapbox\node-pre-gyp\lib\main.js:81:30)
node-pre-gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
node-pre-gyp ERR! System Windows_NT 10.0.19045
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\Programming\\Typescript\\fiftyone\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
node-pre-gyp ERR! cwd E:\Programming\Typescript\fiftyone\node_modules\captcha-canvas\node_modules\canvas
node-pre-gyp ERR! node -v v22.2.0
node-pre-gyp ERR! node-pre-gyp -v v1.0.11Steps to Reproduce
using yarn add node-canvas
NOTE: warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^7.0.1"
is because i have to use 6.0.0 otherwise i get
const stripAnsi = require('strip-ansi');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module E:\Programming\Typescript\fiftyone\node_modules\strip-ansi\index.js from E:\Programming\Typescript\fiftyone\node_modules\string-width\index.js not supported.
Instead change the require of E:\Programming\Typescript\fiftyone\node_modules\strip-ansi\index.js in E:\Programming\Typescript\fiftyone\node_modules\string-width\index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (E:\Programming\Typescript\fiftyone\node_modules\string-width\index.js:2:19) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v22.2.0
Your Environment
- Version of node-canvas (output of
npm list canvasoryarn list canvas):
PS E:\Programming\Typescript\fiftyone> yarn list canvas
yarn list v1.22.19
⠁ (node:11572) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^7.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^7.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^6.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^7.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "strip-ansi@^6.0.1"
warning Filtering by arguments is deprecated. Please use the pattern option instead.
└─ [email protected]
Done in 1.87s.
- Environment (e.g. node 20.9.0 on macOS 14.1.1):
- node version - 10.8.0
Elitezen, Felitendo and JeffreyArts