I have
import fs from 'fs'
and in my package.json I have
Then I run the command
> npm i fs > fs@0.0.2 node_modules/fs
In create-react-app they have stubbed out 'fs'. You cannot import it. They did this because fs is a node core module. You'll have to find another solution to that problem. See this ticket.
create-react-app
fs
1.4m articles
1.4m replys
5 comments
57.0k users