Next.js部署至Vercel后出现404 Not Found问题求助
Next.js作品集网站部署后出现404错误

这是我的作品集网站,此前运行正常。我仅修改了一行不影响功能的内容用于更新个人资料,重新部署后就出现了该404错误。我尝试了网上能找到的所有解决方案均无效,但网站在本地运行正常。
构建日志
Cloning github.com/xxxxx/portfolio (Branch: main, Commit: d4beb3c) Cloning completed: 1.157s Installing build runtime... Build runtime installed: 1.977s No Build Cache available Installing dependencies... yarn install v1.22.17 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... warning "@emotion/react > @emotion/babel-plugin@11.9.2" has unmet peer dependency "@babel/core@^7.0.0". warning "@emotion/react > @emotion/babel-plugin > @babel/plugin-syntax-jsx@7.17.12" has unmet peer dependency "@babel/core@^7.0.0-0". [4/4] Building fresh packages... success Saved lockfile. Done in 38.08s. Running "yarn run build" yarn run v1.22.17 $ next build Attention: Next.js now collects completely anonymous telemetry regarding usage. This information is used to shape Next.js' roadmap and prioritize features. You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: https://nextjs.org/telemetry info - Checking validity of types... info - Creating an optimized production build... info - Compiled successfully info - Collecting page data... info - Generating static pages (0/3) info - Generating static pages (3/3) info - Finalizing page optimization... Page Size First Load JS ┌ ○ / (734 ms) 58.2 kB 134 kB ├ /_app 0 B 75.4 kB ├ ○ /404 193 B 75.6 kB └ λ /api/hello 0 B 75.4 kB + First Load JS shared by all 75.4 kB ├ chunks/framework-a87821de553db91d.js 45 kB ├ chunks/main-04ef9a4c5c83921e.js 28.9 kB ├ chunks/pages/_app-43ac001d99fedbd3.js 493 B ├ chunks/webpack-fd1bc4a65a80e5c8.js 968 B └ css/26d0985ae8dac800.css 168 B λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps) ○ (Static) automatically rendered as static HTML (uses no initial props) Next.js Analytics is enabled for this production build. You'll receive a Real Experience Score computed by all of your visitors. Done in 24.82s. Generated build outputs: - Static files: 12 - Serverless Functions: 0 - Edge Functions: 0 Deployed outputs in 1s Build completed. Populating build cache... Uploading build cache [45.15 MB]... Build cache uploaded: 2.332s Done with "package.json"
再次说明,我并未进行任何重大改动,网站此前运行完全正常。
内容的提问来源于stack exchange,提问作者user349557
相关产品推荐
相关产品推荐

