Functions always returning 404
I'm having real trouble getting functions to work.
- I have a functions folder in the route of my project
- I have placed a 'hello world' style function in functions/api/test.js (copy and past of example from the docs)
- the route shows up in the dashboard UI and logs a request when I test it
- returns 404 on every attempt, via local and deployed
I am testing and deploying with:
npx wrangler pages deploy dist/
and npx wrangler pages dev dist/
I am using wrangler version 3.61.0
No errors or warnings are shown and it deploys successfully.
If it's relevant, I am building my site in Nuxt3 and use npx nuxi build --preset=cloudflare_pages
to create the dist/
Any ideas on what I'm doing wrong?2 Replies
You can’t use SSR Frameworks and Functions together. You need to use whatever API Route system that Nuxt offers
Well that makes sense! Thanks for the reply, I switched to generating static pages and now it works!