The error "Cannot find module 'fsevents'" is a common issue while using Vite on Windows operating system. This error occurs due to the fact that fsevents is a macOS specific API and is not available on Windows.
To solve this issue, you can try the following solutions:
npm install fsevents
npm install fs-extra
This will install a cross-platform replacement for fsevents, which will work on both macOS and Windows.
npm uninstall fsevents
npm cache clean --force
npm install
After trying these solutions, you should be able to resolve the "Cannot find module 'fsevents'" error while using Vite on Windows.
Asked: 2022-12-02 11:00:00 +0000
Seen: 10 times
Last updated: Nov 13 '21