You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do you expect fs to work in the browser? It’s a Node-only API. You can import many modules that work in the browser, but there’s no possible way for modules that rely on fs to do so.
Note that this project doesn’t give you a Node server. Its output is a static HTML/JS/CSS bundle, compatible with any web server. If you’re looking to run a Node.js server and use Node APIs from it, that’s fine, but then you don’t need to put those calls into the client code.
I used this following the instructions on the site, but now whenever I need to install anything that uses fs such as https://github.com/jprichardson/node-jsonfile and https://github.com/sindresorhus/write-json-file or even just trying to use fs doesn't work. Every single time fs is called it says
fs.whatever
is not a function.When I try to console log out fs it just prints an empty object. Something in here is getting rid of fs.
React 16.2.0
The text was updated successfully, but these errors were encountered: