question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Next.js public files are a 404 with now dev

See original GitHub issue

When using the public folder now dev is not able to return the files inside of it using the router

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
lfadescommented, Sep 27, 2019

@TooTallNate The public directory also handles static files, but it goes from the root (e.g /favicon.ico can be in public/favicon.ico). The static directory will be deprecated in favor of public.

2reactions
lfadescommented, Oct 21, 2019

After a test, I can confirm this is no longer an issue 😌

Read more comments on GitHub >

github_iconTop Results From Across the Web

[now dev] Doesn't serve files in next.js public folder #2434
Serving a robots.txt file with next.js from the public folder works as expected when deploying with 'now' but errors (404) when serving ...
Read more >
Static assets upload returns 404 in production nextjs [duplicate]
In production, when I upload an image to the public folder, next.js returns a 404 error when trying to view the image. I...
Read more >
Advanced Features: Static HTML Export - Next.js
Export your Next.js app to static HTML, and run it standalone without the need of a Node.js server.
Read more >
Requesting Next.js web service through public route returns ...
Requesting Next.js web service through public route returns 404 error on Digital Ocean App Platform · Problem · Goal · Files · N.B....
Read more >
NextJS Custom 404 Not Found Page and Footer | Code Blog [8]
In this video we create a custom 404 page which gets displayed if the route is not found. We also create a footer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found