## Problem browser-external:events:9 Module "events" has been externalized for browser compatibility. Cannot access "events.EventEmitter" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details. ## Solution: > i used this package to fix the problem: [vite-plugin-node-polyfills](https://www.npmjs.com/package/vite-plugin-node-polyfills) ```bash pnpm install --save-dev vite-plugin-node-polyfills ``` ## Usage > in your `vite.config.js` file ```bash import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import { nodePolyfills } from "vite-plugin-node-polyfills"; export default defineConfig({ plugins: [react(), nodePolyfills()], }); ```