New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleError: Cannot Resolve 'fs' used in markdown blog-starter example #20814
Comments
This was likely caused by an edit you made to the example. Could you please share your project? |
Hi @Timer, the project is currently private in development. I'm sorry I can't share. |
It does work fine! The two files you referenced in your logs above do not belong to that example:
This would indicate you have I'll close this issue since it's not actionable without you sharing a reproduction. |
I'm sorry about that. The main issue was the Thank you, once again. |
This is caused to an error in your user code. No |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
9.5.1
What version of Node.js are you using?
12.18.4
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
Vercel
Describe the Bug
Following the markdown blog starter, the
fs
module was used in the lib/api.js file to do some reading from a directory.On running
npm run dev
, and accessing the blog page, I get:Expected Behavior
I followed everything in the blog-starter, so I expected the page to load without errors.
To Reproduce
The markdown blog starter template was what I used before getting the error.
Actually, I discovered a solution that worked for me, but I'm just surprised that the blog-starter did not use the solution.
In this discussion, the solution was to have a
next.config.js
configured like so:But the blog starter did not have any
next.config.js
file so I'm wondering how it deployed successfully.I've got the solution already but I think the starter working without the next config file should be addressed documentation-wise or any ways at all.
Awesome job, team. Thank you!
The text was updated successfully, but these errors were encountered: