onwidget / qwind

⭕️ Qwind: A template to make your website using Qwik + Tailwind CSS.
https://qwind.pages.dev
MIT License
251 stars 68 forks source link

Cannot bundle Node.js built-in "fs" after adding cloudflare-pages #17

Closed ThuKieuIC2 closed 1 year ago

ThuKieuIC2 commented 1 year ago

Good health all. I got this error after adding cloudflare-pages plugin to deploy on Cloudflare Pages: pnpm run qwik add cloudflare-pages pnpm i && pnpm build ... [commonjs--resolver] Cannot bundle Node.js built-in "fs" imported from "src/utils/posts.ts". Consider disabling ssr.noExternal or remove the built-in dependency. error during build: RollupError: Cannot bundle Node.js built-in "fs" imported from "src/utils/posts.ts". Consider disabling ssr.noExternal or remove the built-in dependency. PLease help, thanks much

ThuKieuIC2 commented 1 year ago

OKay FIXED, I update packson.json replace "build.server": "vite build -c adapters/cloudflare-pages/vite.config.ts", by "build.server": "vite build -c adapters/static/vite.config.ts",