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
Module not found: Can't resolve 'fs' #50
Comments
Hi @ddresch, Can you inform me your next, react and outstatic versions? Woukd it also be possible to share your [slug] file? Thanks. |
Thanks for this quick response! "next": "^13.0.0",
"outstatic": "^0.0.32-rc",
"react": "^18.0.0",
"react-dom": "^18.0.0", The [slug] file is a copy of the blog example. |
Try upgrading outstatic to the latest version. Let me know if it works. But I've seen this error before, usually it's because 'fs' should only be called on the server side. Somehow it seems the call is being made in the browser... did you change anything in the [slug] file? |
Updated to latest version 0.0.33 and copied |
Are there any documents inside your /offers folder? |
As a side note, I just cloned the example project (deploy with vercel), and changed the values to reflect your |
Hey @ddresch, I'm closing this due to inactivity. Let me know if you need further help. |
I'm also getting the same issue in |
@narendran-kannan did you add outstatic to an already existing project? For me, the 0.0.33-rc closed the issue of not finding the 'fs' module, but it's still not working. But still, the |
Hi @ddresch and @narendran-kannan, I'd love to be able to reproduce the error to help you find a solution. Would you be able to create an example repository with a minimal install of your current setup to see if I can help? Thanks in advance. |
I've added outstatic on existing nextjs project,
|
I think this is because we've used |
But the pages folder only uses fs inside the server side functions... this is why I don't get the error. What version of NodeJs are you using? |
|
Can you create a repo with a simplified version of your project and share it with me? |
Hey @avitorio as I mentioned below, now it is resolved after adding this in the config, still, need a repo? Let me know, will do.
|
@narendran-kannan, yes, a repo with the issue would be nice as I'd like to figure out what is the difference in setup that makes some installs work without that config... |
I also used this config setting in the first place, which I don't need to use anymore with the updated version 0.33-rc. But still, I get 404 errors in frontend for |
I'm trying to add
outstatic
to an existing project. Which is somewhat working. I can access the editor and also the collection creation is running. Currently, I'm struggling with the following issue:It is the copy of the
[slug].tsx
page of the blog example, so nothing new or special.I can get rid of the error if I modify my next.config.js like that:
But I get now paths or an empty array in the
getStaticPaths
method:I'm pretty stuck cause with the empty array it is not dropping an error, but it is ending up constantly in 404 errors of existing pages.
The text was updated successfully, but these errors were encountered: