Fabio53443
Fabio53443
CDCloudflare Developers
Created by Fabio53443 on 1/21/2025 in #pages-help
SvelteKit deployment failing
Hi, i'm trying to deploy this app (https://github.com/Fabio53443/cogestione-mamiani) but i keep getting this error once the project is built.
15:48:33.763 Run npm run preview to preview your production build locally.
15:48:33.763
15:48:33.763 > Using @sveltejs/adapter-cloudflare
15:48:33.773 ✔ done
15:48:33.862 Finished
15:48:33.862 Found _worker.js in output directory. Uploading.
15:48:33.870 ⛅️ wrangler 3.92.0
15:48:33.870 -------------------
15:48:35.028 ▲ [WARNING] The package "node:events" wasn't found on the file system but is built into node.
15:48:35.029
15:48:35.029 Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag. Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported from:
15:48:35.029 - ../../node_modules/postgres/cf/polyfills.js
15:48:33.763 Run npm run preview to preview your production build locally.
15:48:33.763
15:48:33.763 > Using @sveltejs/adapter-cloudflare
15:48:33.773 ✔ done
15:48:33.862 Finished
15:48:33.862 Found _worker.js in output directory. Uploading.
15:48:33.870 ⛅️ wrangler 3.92.0
15:48:33.870 -------------------
15:48:35.028 ▲ [WARNING] The package "node:events" wasn't found on the file system but is built into node.
15:48:35.029
15:48:35.029 Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag. Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported from:
15:48:35.029 - ../../node_modules/postgres/cf/polyfills.js
and many more like that. how can i fix this? how can i add the node compat flag when i'm deploying from the webui? do i need to add the .toml to the git repo? thanks ☀️
4 replies