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
When running wrangler publish on my compiled Sveltekit site, Wrangler throws the following error:
Error: Something went wrong with the request to Cloudflare...
Uncaught SyntaxError: Cannot use import statement outside a module
at line 1
[API code: 10021]
Reproduction
I'm using the latest v1 version of Wrangler (1.19.12). I was not able to get Wrangler 2.x (which is now generally available) to work with the Cloudflare Workers adapter (which is a separate issue, created #4885 for this).
Relevant portions of my wrangler.toml:
type = "javascript"
[site]
bucket = "./dist/assets"entry-point = "./dist/worker"
[build.upload]
format = "modules"main = "./worker.mjs"
Logs
🌀 Running
✨ Build completed successfully!
🌀 Using namespace for Workers Site "__my-production-workers_sites_assets"
✨ Success
🌀 Uploading site files
Error: Something went wrong with the request to Cloudflare...
Uncaught SyntaxError: Cannot use import statement outside a module
at line 1
[API code: 10021]
Without this I'm unable to deploy my site to production. I was initially using the static adapter but switched over after reading #4818 and also after having issues with getting error pages to render on 404s and such (due to not knowing how to properly handle things in my Workers' index file). So I now have a site that I'm unable to update until this is addressed.
The text was updated successfully, but these errors were encountered:
jaymakes11
changed the title
[adapter-cloudflare-workers] Built site not able to be uploaded to Workers
[adapter-cloudflare-workers] Not able to upload built site to Workers
May 12, 2022
jaymakes11
changed the title
[adapter-cloudflare-workers] Not able to upload built site to Workers
[adapter-cloudflare-workers] Not able to upload/publish built site to Workers
May 12, 2022
#4887 was merged, and requires the use of Wrangler 2 which should have no problem with ESM syntax, so I'll close this (but feel free to open a new issue with a reproduction if not)
Describe the bug
When running
wrangler publish
on my compiled Sveltekit site, Wrangler throws the following error:Reproduction
I'm using the latest v1 version of Wrangler (1.19.12). I was not able to get Wrangler 2.x (which is now generally available) to work with the Cloudflare Workers adapter (which is a separate issue, created #4885 for this).
Relevant portions of my wrangler.toml:
Logs
System Info
Severity
blocking all usage of SvelteKit
Additional Information
Without this I'm unable to deploy my site to production. I was initially using the static adapter but switched over after reading #4818 and also after having issues with getting error pages to render on 404s and such (due to not knowing how to properly handle things in my Workers' index file). So I now have a site that I'm unable to update until this is addressed.
The text was updated successfully, but these errors were encountered: