canvas
canvas copied to clipboard
Error StringExpected
when i use the code on the npm page to create the house I get
Error
at createCanvas (C:\Users\User\Documents\Discord Bots\Suggestions\node_modules\@napi-rs\canvas\index.js:160:7)
at Object.execute (C:\Users\User\Documents\Discord Bots\Suggestions\commands\user commands\profile.js:24:24)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 'StringExpected'
}
the line 24 in profile.js is
const canvas = createCanvas(300, 320)
is it possible to make these errors more meaningful? Right now it's hard to debug what exactly went wrong because most of the errors are like
Error ...
code: '<SomeType>Expected'
We have to depend upon the line number in the stacktrace
I'll improve the error messages in NAPI-RS
Related on Prisma side: https://github.com/prisma/prisma/issues/13864