Nextjs 14.1 Build Errors Module not found : "fs" (not noticed in 14.0.3) #61153
-
SummaryMy (Nextjs) project has a dependency on a external package which exports mostly browser compatible code but also exports some utility function that depend on some nodejs specific modules (for e.g. "fs"). This external package is being imported into both client & server components. I am currently using But if I upgrade to I tried different options:
But none of these changes seem to help. Anything changed with the Webpack resolution in Nextjs 14.1 ?? Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For anyone curious, I was able to fix this issue with this hack from earlier post: The key thing to note here is using It's interesting that I didn't have to do this (modify webpack config) in
|
Beta Was this translation helpful? Give feedback.
For anyone curious, I was able to fix this issue with this hack from earlier post:
The key thing to note here is using
typeof nextRuntime === "undefined"
and NOTisServer
option ( I tried this and it doesn't help!)It's interesting that I didn't have to do this (modify webpack config) in
14.0.3
but I have to do it for14.1.0
🤔