Uncaught Error: Module "events" has been externalized for browser compatibility. Cannot access "events.EventEmitter" in client code

Viewed 972

I don't know what's going on I am making a frontend using vite + react for my mern project and suddenly starts encountering this error.

Error: Module "events" has been externalized for browser compatibility. Cannot access "events.EventEmitter" in client code.

git repo link : https://github.com/Gaurav200247/E-Book-Store-Mern-Project

1 Answers

Had the same issue, the "events" module was in sub-dependencies, I added it manually by "npm install events", then the issue disappeared.

Related