简体   繁体   English

开玩笑--watch(npm t — --watch)抛出错误

[英]jest --watch (npm t — --watch) throwing errors

node[1265] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 节点[1265](FSEvents.framework)FSEventStreamStart:register_with_server:错误:f2d_register_rpc()=>(空)(-22)

This happens when running npm t -- --watch . 运行npm t -- --watch时会发生这种情况。 On my system node v7.4.0 it works fine. 在我的系统节点v7.4.0上,它可以正常工作。 On my fellow coworker (node v7.9) it fails. 在我的同事(节点v7.9)上,它失败了。

This question here asks the exact problem: 这里的问题问的是确切的问题:

Testing with Jest failed with Error: Error watching file for changes: EMFILE 使用Jest进行测试失败,并显示错误:监视文件是否有错误:EMFILE


However the fix "install watchman" didn't work. 但是,修复“安装守望者”无效。

We did brew install watchman then brew postinstall watchman 我们做了brew install watchman然后做了brew postinstall watchman

Then when trying to run npm t -- --watch again we get a new error: 然后,当尝试运行npm t -- --watch时,我们得到一个新错误:

/Users/user/Library/LaunchAgents/com.github.facebook.watchman.plist: Operation not permitted /Users/user/Library/LaunchAgents/com.github.facebook.watchman.plist:不允许操作

Anyone else running into a problem with jest watch ? 还有其他人在jest watch的问题吗?

The regular npm t will work. 常规的npm t将起作用。

After installing watchman , you can give it a full permission to the launch agents by sudo chown -R $(whoami):staff ~/Library/LaunchAgents . 安装watchman ,您可以通过sudo chown -R $(whoami):staff ~/Library/LaunchAgents授予启动代理完全权限。
It will resolve the permission issue. 它将解决权限问题。

因此,我们不得不在其计算机上与watchman一起安装jest-cli ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM