Next.js Discord

Discord Forum

need help configuring the default next js image loader and fixing my module not found error.

Unanswered
Giant panda posted this in #help-forum
Open in Discord
Giant pandaOP
Hello @everyon ( sorry for the long title) but im having issues on deployment of a website. On deployment im getting module not found errors even though they are the correct filepaths and are in the public directory. i tried use ("@/filename.png"), (/filename.png) , and my relative path which is : (import fileName from '../../../../public/fileName.png'; ) . for context I had it set up this way since my file structure was set up pretty weird. i had a file called 'myPortfolio' and within that file i cloned a git repo called next-animated-portfolio which has everything in it. after trouble shooting it i found its something linked to my filepaths and my next.config.js file which has the loaders.

0 Replies