Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
nextjs - Cloudflare Developers
CD
Cloudflare Developers
•
3y ago
•
7 replies
李二牛li2niu
nextjs
Hi
, I am deploying a nextjs project with
/functions to Pages
. You can have a preview here at
https://q.li2niu.com
. But all the apis under
/functions return 404
(e
.g
.
https://q.li2niu.com/api/v1/auth/github/redirect
)like this post said
pages-help
Pages not creating Worker, NextJS returns 404
. Sadly
, the solution is not useful for me
.
File arch
.
Build command
: npx
@cloudflare
/next
-on
-pages
@1
Build output directory
:
/
.vercel
/output
/static
Build system version
: 1
(latest
)
Root directory
:
/
I tried to change
Build output directory: /.vercel/output
Build output directory: /.vercel/output
, the apis became OK but the static assets of pages are not correctly loaded
. Really confused the culprit
Cloudflare Developers
Join
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
NextJS Routing
CD
Cloudflare Developers / pages-help
3y ago
Nextjs 14 API
CD
Cloudflare Developers / pages-help
2y ago
nextJS Build Manifest...
CD
Cloudflare Developers / pages-help
2y ago
Websockets with NextJS
CD
Cloudflare Developers / pages-help
3y ago