You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to build with adapter-cloudflare but I get the following error:
Using @sveltejs/adapter-cloudflare
✘ [ERROR] Could not resolve "@node-rs/argon2-wasm32-wasi"
node_modules/@node-rs/argon2/browser.js:1:14:
1 │ export * from '@node-rs/argon2-wasm32-wasi'
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@node-rs/argon2-wasm32-wasi" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
const config = {
// Consult https://svelte.dev/docs/kit/integrations
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter({
routes: {
include: ['/*'],
exclude: ['<all>']
},
platformProxy: {
environment: undefined,
experimentalJsonConfig: false,
persist: false
}
}),
alias: {
'@/*': './src/lib/*'
}
}
};
> Using @sveltejs/adapter-cloudflare
✘ [ERROR] Could not resolve "@node-rs/argon2-wasm32-wasi"
node_modules/@node-rs/argon2/browser.js:1:14:
1 │ export* from '@node-rs/argon2-wasm32-wasi'
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@node-rs/argon2-wasm32-wasi" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
error during build:
Error: Bundling with esbuild failed with 1 error
at adapt (file:///home/stockdale/Sites/deliverys-bane/node_modules/@sveltejs/adapter-cloudflare/index.js:140:11)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async adapt (file:///home/stockdale/Sites/deliverys-bane/node_modules/@sveltejs/kit/src/core/adapt/index.js:38:2)
at async finalise (file:///home/stockdale/Sites/deliverys-bane/node_modules/@sveltejs/kit/src/exports/vite/index.js:908:7)
at async Object.handler (file:///home/stockdale/Sites/deliverys-bane/node_modules/@sveltejs/kit/src/exports/vite/index.js:938:5)
at async PluginDriver.hookParallel (file:///home/stockdale/Sites/deliverys-bane/node_modules/rollup/dist/es/shared/node-entry.js:20734:17)
at async Object.close (file:///home/stockdale/Sites/deliverys-bane/node_modules/rollup/dist/es/shared/node-entry.js:21712:13)
at async build (file:///home/stockdale/Sites/deliverys-bane/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:65466:17)
at async CAC.<anonymous> (file:///home/stockdale/Sites/deliverys-bane/node_modules/vite/dist/node/cli.js:828:5)
This a known issue, cloudflare itself doesn't support wasm modules, although don't know this can be fixed within sveltekit, would be very nice if so
For now noble hashes have a js implementation which works
Describe the bug
Trying to build with adapter-cloudflare but I get the following error:
You can mark the path "@node-rs/argon2-wasm32-wasi" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
Versions:
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-cloudflare": "^4.7.4",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
I've tried a number of vite.config.ts fixes to mark the package as external but no success:
Also, my svelte.config.js:
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-fqgkti
Logs
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: