Successful Deployment

I am getting 404 error message after my deployment. The deployment status is showing as “ready”. However, the App is returning a 404 error. I have tried to troubleshoot based on resources provided but no luck.

Below is the deployment log:

[14:59:17.377] Running build in Washington, D.C., USA (East) – iad1
[14:59:17.561] Cloning github.com/kihumban/chat-agieos-graph-cloud (Branch: master, Commit: cbd92ad)
[14:59:17.886] Previous build cache not available
[14:59:18.117] Cloning completed: 555.33ms
[14:59:18.387] Running "vercel build"
[14:59:18.806] Vercel CLI 39.1.3
[14:59:19.403] Installing dependencies...
[14:59:19.818] yarn install v1.22.19
[14:59:19.887] [1/4] Resolving packages...
[14:59:20.123] [2/4] Fetching packages...
[14:59:20.182] (node:123) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
[14:59:20.182] (Use `node --trace-deprecation ...` to show where the warning was created)
[14:59:43.770] [3/4] Linking dependencies...
[14:59:52.648] [4/4] Building fresh packages...
[14:59:52.667] Done in 32.85s.
[14:59:52.701] Running "yarn run build"
[14:59:52.892] yarn run v1.22.19
[14:59:52.914] $ next build
[14:59:53.588] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[14:59:53.588] This information is used to shape Next.js' roadmap and prioritize features.
[14:59:53.589] 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:
[14:59:53.589] https://nextjs.org/telemetry
[14:59:53.589] 
[14:59:53.671]    Creating an optimized production build ...
[14:59:54.660] (node:293) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
[14:59:54.661] (Use `node --trace-deprecation ...` to show where the warning was created)
[15:00:20.169]  ✓ Compiled successfully
[15:00:20.170]    Linting and checking validity of types ...
[15:00:23.314] 
[15:00:23.315] ./app/hooks/useThreads.tsx
[15:00:23.315] 29:6  Warning: React Hook useEffect has missing dependencies: 'searchOrCreateThread' and 'threadId'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
[15:00:23.315] 
[15:00:23.315] ./app/hooks/useUser.tsx
[15:00:23.315] 20:6  Warning: React Hook useEffect has a missing dependency: 'userId'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[15:00:23.315] 
[15:00:23.315] info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
[15:00:26.809]    Collecting page data ...
[15:00:27.423]  ⚠ Using edge runtime on a page currently disables static generation for that page
[15:00:28.420]    Generating static pages (0/5) ...
[15:00:28.438] 
   Generating static pages (1/5) 
[15:00:30.395] 
   Generating static pages (2/5) 
[15:00:30.395] 
   Generating static pages (3/5) 
[15:00:30.395] 
 ✓ Generating static pages (5/5) 
[15:00:33.329]    Finalizing page optimization ...
[15:00:33.329]    Collecting build traces ...
[15:00:34.860] 
[15:00:34.863] Route (app)                              Size     First Load JS
[15:00:34.863] ┌ ○ /                                    819 kB          905 kB
[15:00:34.863] ├ ○ /_not-found                          883 B            86 kB
[15:00:34.863] ├ ℇ /api/[..._path]                      0 B                0 B
[15:00:34.863] └ λ /api/runs/share                      0 B                0 B
[15:00:34.863] + First Load JS shared by all            85.1 kB
[15:00:34.863]   ├ chunks/7864-c6e826e7347ac6f5.js      27.6 kB
[15:00:34.863]   ├ chunks/fd9d1056-84ad2717a66a8eb0.js  51.1 kB
[15:00:34.863]   ├ chunks/main-app-055e7188ae38043e.js  240 B
[15:00:34.863]   └ chunks/webpack-ae59a764219f5ce0.js   6.18 kB
[15:00:34.863] 
[15:00:34.863] 
[15:00:34.863] ℇ  (Streaming)  server-side renders with streaming (uses React 18 SSR streaming or Server Components)
[15:00:34.863] λ  (Server)     server-side renders at runtime (uses getInitialProps or getServerSideProps)
[15:00:34.863] ○  (Static)     automatically rendered as static HTML (uses no initial props)
[15:00:34.863] 
[15:00:34.950] Done in 42.06s.
[15:00:34.976] Build Completed in /vercel/output [1m]
[15:00:35.010] Deploying outputs...
[15:00:36.448] 
[15:00:36.741] Deployment completed
[15:00:55.548] Uploading build cache [109.23 MB]...
[15:00:56.728] Build cache uploaded: 1.180s

There’s another community post with 404 debugging tips that might be helpful. Please give these solutions a try and let us know how it goes.

A human should be around soon to offer more advice. But you can also get helpful information quickly by asking v0.

Hi,

Can you try settings Framework Preset to Next.js In your Project Settings and try redeploying: Login – Vercel ?

@swarnava Thank you. That actually addressed the issue. The deployment is successful. However, I am getting the following error message. Any idea?

Here is a printout of the browser console:

Hi @kihumban, from the console image it seems like you’re using the hardcoded absolute URL for the API (localhost:3000) instead of relative paths such as /api/threads. This is why your app is not using the deployment URL but the hardcoded URL, which works locally because localhost:3000 is where the app runs but after deployment the URL is different.

Updating the code to use relative paths will solve this issue. I hope this helps.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.