fsyntax
fsyntax
NNuxt
Created by fsyntax on 9/13/2023 in #❓・help
Weird RollupError on running `nuxi build`
Hey everyone! Im trying to build a Nuxt 3 / Prismic app with the cloudflare_pages preset enabled (I also tried other cloudflare presets). The build runs fine, but after the prerendering process I get this error:
ℹ Building Nitro Server (preset: cloudflare_pages) nitro 10:36:49
(node-resolve plugin) Could not resolve import "unenv/runtime/mock/proxy-cjs/" in C:\Users\marco.freiberger\WebstormProjects\aromapflegekongress\node_modules\.pnpm\[email protected]\node_modules\tough-cookie\lib\cookie.js using exports defined in C:\Users\marco.freiberger\WebstormProjects\aromapflegekongress\node_modules\.pnpm\[email protected]\node_modules\unenv\package.json.
(inject plugin) rollup-plugin-inject: failed to parse C:/Users/marco.freiberger/WebstormProjects/aromapflegekongress/node_modules/.pnpm/[email protected]/node_modules/canvas/build/Release/canvas.node. Consider restricting the plugin to particular files via options.include

ERROR RollupError: Unexpected character '�' (Note that you need plugins to import files that are not

1: MZ�♥♦���@►☺▼�� �!�☺L�!This program cannot be run in DOS mode.
^
2: $�������������
3: �����

 ELIFECYCLE  Command failed with exit code 1.
ℹ Building Nitro Server (preset: cloudflare_pages) nitro 10:36:49
(node-resolve plugin) Could not resolve import "unenv/runtime/mock/proxy-cjs/" in C:\Users\marco.freiberger\WebstormProjects\aromapflegekongress\node_modules\.pnpm\[email protected]\node_modules\tough-cookie\lib\cookie.js using exports defined in C:\Users\marco.freiberger\WebstormProjects\aromapflegekongress\node_modules\.pnpm\[email protected]\node_modules\unenv\package.json.
(inject plugin) rollup-plugin-inject: failed to parse C:/Users/marco.freiberger/WebstormProjects/aromapflegekongress/node_modules/.pnpm/[email protected]/node_modules/canvas/build/Release/canvas.node. Consider restricting the plugin to particular files via options.include

ERROR RollupError: Unexpected character '�' (Note that you need plugins to import files that are not

1: MZ�♥♦���@►☺▼�� �!�☺L�!This program cannot be run in DOS mode.
^
2: $�������������
3: �����

 ELIFECYCLE  Command failed with exit code 1.
When building via nuxi generate, the build finishes successfully, but when testing it with wrangler pages dev /dist, the content of the routes doesnt seem to change. I've found this (https://github.com/nuxt/nuxt/issues/15057) issue on Github, but I can see where this error is related to my project.. Help is much appreciated 🙏
7 replies