-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Error [ERR_INTERNAL_ASSERTION]: TypeError: Method height called on incompatible receiver #<Canvas> #39866
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
Comments
Thanks for bug reporting, could you provide a more precise description about how to repro the error? Does the error occur when installing I have tried on MacOS const canvas = require("canvas")
const util = require('util')
console.log(util.inspect(canvas))
It works as intented. |
The error occured when i requiring the module, the installation work properly. my exact code is : const code = message.content.slice(prefix.length+command.length+1); // this line work with the module discord.js
const res = await eval(code);
return require("util").inspect(res, { showHidden: true, color: false }); // the error is here |
To reproduce the error:
|
@nodejs/util |
Access to getters/setters on prototype of It means that node/lib/internal/util/inspect.js Line 1674 in 52ebe0f
|
@Ayase-252 it seems to be the issue, but I'm a bit surprised by that. I don't see in the spec where @nodejs/v8 |
I guess that's the correct behaviour according to the spec:
|
How should we handle these cases in general? This is not the first time something like that has come up and it's not specific to logging. We could use an internal |
By now I wonder if we really want to special handle this. I don't really think so as it is something that comes from an implementation that does things in a way that V8 is not able to handle and I guess that could happen in multiple places for lots of reasons. If someone disagrees, please leave a comment or reopen. |
Uh oh!
There was an error while loading. Please reload this page.
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 :
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 :
What do you see instead?
I see this error :
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.
or
this code is executed from the method eval
The text was updated successfully, but these errors were encountered: