[英]anyone use watchify on linux? shouldn't it automatically be using inotify?
I'm on Linux trying to use watchify
and keep getting 我在Linux上尝试使用
watchify
并不断获取
Error: Cannot find module 'fsevents' from ~/dir
Why is fsevents
even being considered by my system? 为什么我的系统甚至考虑使用
fsevents
? Isn't it strictly a Mac tool? 严格来说,这不是Mac工具吗? How do I get node to use
inotify
as its default file monitor instead of fsevents
? 我如何让节点将
inotify
用作其默认文件监视器而不是fsevents
? Specifically, I want watchify
to wrap files before and after file changes. 具体来说,我想
watchify
一下在文件更改之前和之后包装文件。 Why is this? 为什么是这样?
I've tried using node-inotify
but for some reason I'm still getting 我已经尝试过使用
node-inotify
但由于某些原因,我仍然
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
According to this , inotify should just kick in automatically since I'm on Linux. 根据此 ,inotify的应该只是踢自动因为我在Linux上。
在Mac上没有inotify支持(这是Linux内核接口),因此您不能这样做。
instead of using watchify/browserify
bundles, consider using webpack --watch
as a powerful alternative for modular bundling. watchify/browserify
使用watchify/browserify
捆绑包, webpack --watch
考虑使用webpack --watch
作为模块化捆绑的有力替代方案。 if you're using linux, engage inotify
with 如果你正在使用Linux,搞
inotify
与
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
this is straight from the webpack docs under troubleshooting 这直接来自故障排除下的webpack文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.