-1

i have install fs module but still i got the error that module is not foud https://prnt.sc/J_kApm93R9SW

how to resolve this problem

juliomalves
  • 42,130
  • 20
  • 150
  • 146
preet
  • 1
  • 1
    look at this https://stackoverflow.com/questions/64926174/module-not-found-cant-resolve-fs-in-next-js-application – xcc Jan 11 '23 at 09:37
  • Is this a script that runs in the front-end? If so, there is no `fs` module in the browser. The `fs` module only exists in nodejs and can only be used in scripts that run in nodejs. – jfriend00 Jan 11 '23 at 10:00
  • Welcome to Stack Overflow! Please reserve the use of images for diagrams or demonstrating rendering bugs, things that are impossible to describe accurately via text. Please read [ask] and [edit] your question to add formatted code. For more information, please see the Meta FAQ entry [Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/a/285557/20153035) – Fastnlight Jan 11 '23 at 16:13

1 Answers1

0

Read the first comment.

TL;TR

Use fs somewhere in server-side code. Use this tool to check generated client-side code. Copy your code and play around. fs should disappear if you use it in getServerSideProps and reappear, if you don't use it.

Stefan
  • 576
  • 7
  • 27