N
Nuxt7mo ago
Renegade

Build with node-canvas

Hello, when building my app with node-canvas it always fails with:
1: MZ�♥♦���@↑☺▼�� �!�☺L�!This program cannot be run in DOS mode.
^
2: $�������������
3: �����


ERROR node_modules/canvas/build/Release/canvas.node (1:2): Unexpected character '�' (Note that you need plugins to import files that are not JavaScript) 16:37:37

at getRollupError (/F:/Coding/node_modules/rollup/dist/es/shared/parseAst.js:396:41)
at ParseError.initialise (/F:/Coding/node_modules/rollup/dist/es/shared/node-entry.js:11332:28)
at convertNode (/F:/Coding/node_modules/rollup/dist/es/shared/node-entry.js:13082:10)
at convertProgram (/F:/Coding/node_modules/rollup/dist/es/shared/node-entry.js:12399:12)
at Module.setSource (/F:/Coding/node_modules/rollup/dist/es/shared/node-entry.js:14246:24)
at async ModuleLoader.addModuleSource (/F:/Coding/node_modules/rollup/dist/es/shared/node-entry.js:18892:13)
1: MZ�♥♦���@↑☺▼�� �!�☺L�!This program cannot be run in DOS mode.
^
2: $�������������
3: �����


ERROR node_modules/canvas/build/Release/canvas.node (1:2): Unexpected character '�' (Note that you need plugins to import files that are not JavaScript) 16:37:37

at getRollupError (/F:/Coding/node_modules/rollup/dist/es/shared/parseAst.js:396:41)
at ParseError.initialise (/F:/Coding/node_modules/rollup/dist/es/shared/node-entry.js:11332:28)
at convertNode (/F:/Coding/node_modules/rollup/dist/es/shared/node-entry.js:13082:10)
at convertProgram (/F:/Coding/node_modules/rollup/dist/es/shared/node-entry.js:12399:12)
at Module.setSource (/F:/Coding/node_modules/rollup/dist/es/shared/node-entry.js:14246:24)
at async ModuleLoader.addModuleSource (/F:/Coding/node_modules/rollup/dist/es/shared/node-entry.js:18892:13)
Code: https://gist.github.com/Renegade1912/a4cb2bad160ac1e91515f1d1645f57e6 Also the dev server often fails when restarting after changes. I have already searched through this discord and read https://discord.com/channels/473401852243869706/1186602519489691739. Yeah, the module seems to be a little older, but it suits my needs pretty good. My backend needs to generate jpegs for OpenEPaperLink Tags, so i need a package with antialias = 'none' support. The images can be anything created in the browser (generating in the frontend will works like MIRO/FIGMA jam drawing). So my question, any good replacement packages or solutions to fix? ❤️
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server