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.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-12-02 11:00:00 +0000
Seen: 10 times
Last updated: Nov 13 '21