-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chokidar throws "Can't resolve 'fsevents'" warning on Windows #48
Comments
There is an issue on Chokidar's repo for the same problem. Over there I explained a solution. It is still kind of a workaround, but you don't need to change a 3rd party dependency's code: Just mock the
module.exports = undefined In resolve: {
alias: {
fsevents$: path.resolve(__dirname, `fsevents.js`),
},
}, I explain this in detail on Stack Overflow |
Thanks for your comment. You've inspired a fix which does not break Simply add this to the if (process.platform !== "darwin") {
context.plugins.push(
new webpack.IgnorePlugin({
resourceRegExp: /^fsevents$/,
})
);
} |
After the #45 PR was merged, on Windows machines it will still try to import
fsevents
despite not being supported. This seems to not impact the building of the binary usingyarn run dist
but seems to haltyarn run start
.The stack trace of the warning message is as follows:
A workaround for the issue is to delete lines 8-12 from the
node_modules/@vinceau/slp-realtime/node_modules/chokidar/lib/fsevents-handler.js
.Not really sure how to fix this since the error is happening from the actual
require()
statement and not coming from the catch and subsequentconsole.error()
.This issue only affects Windows.
The text was updated successfully, but these errors were encountered: