-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.
Description
Version
v16.7.0
Platform
Microsoft Windows NT 10.0.19043.0 x64
Subsystem
No response
What steps will reproduce the bug?
First, i have start a PowerShell terminal in visual studio code.
After, i run the command "npm i canvas" and i have this error from the command :
node:internal/errors:464
ErrorCaptureStackTrace(err);How often does it reproduce? Is there a required condition?
This error occurs as soon as I require the "canvas" module, but only with this module.
What is the expected behavior?
I should receive this when requesting the module :
{
Canvas: [Function],
Context2d: [Function],
CanvasRenderingContext2D: [Function],
CanvasGradient: [Function],
CanvasPattern: [Function],
Image: [Function],
ImageData: [Function],
PNGStream: [Function],
PDFStream: [Function],
JPEGStream: [Function],
DOMMatrix: [Function],
DOMPoint: [Function],
registerFont: [Function],
parseFont: [Function],
createCanvas: [Function],
createImageData: [Function],
loadImage: [Function],
backends: [Object],
version: '2.8.0',
cairoVersion: '1.17.4',
jpegVersion: '8',
gifVersion: '5.2.1',
freetypeVersion: '2.10.4',
rsvgVersion: '2.50.3',
averageColor: [AsyncFunction]
}What do you see instead?
I see this error :
node:internal/errors:464
ErrorCaptureStackTrace(err);
^
Error [ERR_INTERNAL_ASSERTION]: Error [ERR_INTERNAL_ASSERTION]: Error [ERR_INTERNAL_ASSERTION]: TypeError: Method height called on incompatible receiver #<Canvas>
at getOwnPropertyDescriptor (<anonymous>)
at formatProperty (node:internal/util/inspect:1674:18)
at formatRaw (node:internal/util/inspect:1004:9)
at formatValue (node:internal/util/inspect:791:10)
at formatProperty (node:internal/util/inspect:1679:11)
at formatRaw (node:internal/util/inspect:1004:9)
at formatValue (node:internal/util/inspect:791:10)
at formatProperty (node:internal/util/inspect:1679:11)
at formatRaw (node:internal/util/inspect:1004:9)
at formatValue (node:internal/util/inspect:791:10)
at Object.inspect (node:internal/util/inspect:338:10)
at msgResponse (C:\Users\CEDRIC2005\code\eden\LanaPUBLIC\exe\cmd\dev\eval.js:42:108)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
at new NodeError (node:internal/errors:371:5)
at Function.fail (node:internal/assert:20:9)
at handleMaxCallStackSize (node:internal/util/inspect:1368:10)
at formatRaw (node:internal/util/inspect:1011:12)
at formatValue (node:internal/util/inspect:791:10)
at formatRaw (node:internal/util/inspect:1004:9)
at formatProperty (node:internal/util/inspect:1679:11)
at formatRaw (node:internal/util/inspect:1004:9)
at formatValue (node:internal/util/inspect:791:10)
at Object.inspect (node:internal/util/inspect:338:10)
at getGoodLength (C:\Users\CEDRIC2005\code\eden\LanaPUBLIC\exe\cmd\dev\eval.js:31:65)
at msgResponse (C:\Users\CEDRIC2005\code\eden\LanaPUBLIC\exe\cmd\dev\eval.js:42:108)
at Object.exe (C:\Users\CEDRIC2005\code\eden\LanaPUBLIC\exe\cmd\dev\eval.js:59:7)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
at new NodeError (node:internal/errors:371:5)
at Function.fail (node:internal/assert:20:9)
at handleMaxCallStackSize (node:internal/util/inspect:1368:10)
at formatRaw (node:internal/util/inspect:1011:12)
at formatValue (node:internal/util/inspect:791:10)
at formatProperty (node:internal/util/inspect:1679:11)
at formatRaw (node:internal/util/inspect:1004:9)
at formatValue (node:internal/util/inspect:791:10)
at Object.inspect (node:internal/util/inspect:338:10)
at getGoodLength (C:\Users\CEDRIC2005\code\eden\LanaPUBLIC\exe\cmd\dev\eval.js:31:65)
at msgResponse (C:\Users\CEDRIC2005\code\eden\LanaPUBLIC\exe\cmd\dev\eval.js:42:108)
at Object.exe (C:\Users\CEDRIC2005\code\eden\LanaPUBLIC\exe\cmd\dev\eval.js:59:7)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
at new NodeError (node:internal/errors:371:5)
at Function.fail (node:internal/assert:20:9)
at handleMaxCallStackSize (node:internal/util/inspect:1368:10)
at formatRaw (node:internal/util/inspect:1011:12)
at formatValue (node:internal/util/inspect:791:10)
at Object.inspect (node:internal/util/inspect:338:10)
at getGoodLength (C:\Users\CEDRIC2005\code\eden\LanaPUBLIC\exe\cmd\dev\eval.js:31:65)
at msgResponse (C:\Users\CEDRIC2005\code\eden\LanaPUBLIC\exe\cmd\dev\eval.js:42:108)
at Object.exe (C:\Users\CEDRIC2005\code\eden\LanaPUBLIC\exe\cmd\dev\eval.js:59:7)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 'ERR_INTERNAL_ASSERTION'
}Additional information
No response
Edit :
I see the require response with require("util").inspect(data).
But if i use the method JSON.stringify(data) or call a string after, no error occured.
// ENTRIES
JSON.stringify(require("canvas"), null, 2)
// OUTPUT
{
"backends": {},
"version": "2.8.0",
"cairoVersion": "1.17.4",
"jpegVersion": "8",
"gifVersion": "5.2.1",
"freetypeVersion": "2.10.4",
"rsvgVersion": "2.50.3"
}or
// ENTRIES
require("canvas"); "hello"
// OUTPUT
"hello"this code is executed from the method eval
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.