Replies: 1 comment
-
Are you using
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Static file serving API does not work as you explain it here:
https://nextjs.org/docs/basic-features/static-file-serving
how does it not work?
reproduction steps...
I'm on 9.3.4 so I'm not using /static nor /public/static
I even tried hard-pathing it to '../../public/test-image.jpg' (I knew this wouldn't work, but i had to at least try it out any way)
for some strange reason though, the /public sub-dir is not serving files
DO I NEED WEBPACK LOADERS???
the exact error is this:
Failed to compile
./pages/index.jsx
Module not found: Can't resolve './test-image.jpg' in '/Users/home/projects/next-apps/project1/src/pages'
This could be the problem... if you look at the path above, it's resolving to the /pages sub-dir instead of the /public folder
Beta Was this translation helpful? Give feedback.
All reactions