URGENT: Module not found: Can't resolve 'fs' #49481
Replies: 4 comments 1 reply
-
It happens when server code somehow makes it to the code intended for the browser, because the browser doesn't have the fs module. |
Beta Was this translation helpful? Give feedback.
-
Could you show what's going on in It'd seem like some package is not making use It might be a transitive problem. |
Beta Was this translation helpful? Give feedback.
-
if you use some function like |
Beta Was this translation helpful? Give feedback.
-
I just ran into the same problem. I found a solution that worked fro me here: |
Beta Was this translation helpful? Give feedback.
-
Summary
Hey all,
I have tried just about everything to resolve this but now i need some help. I have had a project running for a year now untouched, i went in to update a couple of env variable path names and pushed back to github and vercel and i get the following error:
`- error ./node_modules/next/dist/compiled/@vercel/og/index.node.js:17950:0
Module not found: Can't resolve 'fs'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/next/dist/server/web/spec-extension/image-response.js
./node_modules/next/server.js
./node_modules/@supabase/auth-helpers-nextjs/dist/index.js
./src/pages/_app.tsx`
I am running next 13.0.7 and for the life of me cannot figure out what is going on. Like i said the project has been running untouched perfectly for a year. I have referenced everything available and tried a multitude of different solutions without success.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions