Module not found: Error: Can't resolve 'fs' in dotenv - upgrading to react 17

Viewed 2071

I recently upgraded my react app - initially created with CRA, but i'm getting an error i can't figure out how to solve :

ERROR in ./node_modules/dotenv/lib/main.js 24:11-24

Module not found: Error: Can't resolve 'fs' in '/project/frontend-react/node_modules/dotenv/lib'

EDIT:

  • what am I doing to get this error : npm start
  • where do I get that error : in the browser, the app is not loading at all
  • and in regard to the error it's really all i'm getting

Any help welcome, as i'm lost despite quiet a lot of research...

1 Answers

Well, I was using dotenv on the app, removing it cleared the error...

Related