0wczar / airframe-react

Free Open Source High Quality Dashboard based on Bootstrap 4 & React 16: http://dashboards.webkom.co/react/airframe
https://airframe-react-lime.vercel.app
MIT License
3.93k stars 714 forks source link

Cannot find module 'fs' #25

Open HarveyLijh opened 4 years ago

HarveyLijh commented 4 years ago

First of all, thanks for providing this fantastic react demo.

I currently encounter an issue when trying to use "fs" module to read and write new files. It always shows that "Cannot find module 'fs'". I tried to solve the issue by editing this file"airframe-react-master/build/webpack.config.client.prod.js", as this "https://stackoverflow.com/questions/39249237/node-cannot-find-module-fs-when-using-webpack" instructed, but it still doesn't work. Would you please tell me any solution to this situation?

Thanks a lot!

HZSamir commented 2 years ago

@HarveyLijh The fs module is a server-side module. You can't use it on the client-side i.e: the browser.