I have
import fs from 'fs'
and in my package.json I have
Then I run the command
> npm i fs > [email protected] 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
2.1m questions
2.1m answers
60 comments
57.0k users