NuxtN
Nuxt3y ago
fsyntax

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\tough-cookie@4.1.3\node_modules\tough-cookie\lib\cookie.js using exports defined in C:\Users\marco.freiberger\WebstormProjects\aromapflegekongress\node_modules\.pnpm\unenv@1.7.4\node_modules\unenv\package.json.
(inject plugin) rollup-plugin-inject: failed to parse C:/Users/marco.freiberger/WebstormProjects/aromapflegekongress/node_modules/.pnpm/canvas@2.11.2/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 🙏
GitHub
Environment Operating System: Windows_NT Node Version: v16.17.0 Nuxt Version: 3.0.0-rc.11 Nitro Version: 0.5.4 Package Manager: npm@8.15.0 Builder: vite Reproduction I Tried to reproduce but looks ...
Was this page helpful?