node [1265](FSEvents.framework)FSEventStreamStart:register_with_server:错误:f2d_register_rpc()=>(null)( - 22)
运行npm t -- --watch
时会发生这种情况。在我的系统节点v7.4.0上,它工作正常。在我的同事(节点v7.9)上,它失败了。
这个问题在这里询问确切的问题:
Testing with Jest failed with Error: Error watching file for changes: EMFILE
但是修复“安装守望者”不起作用。
我们做了brew install watchman
然后brew postinstall watchman
然后当我再次尝试运行npm t -- --watch
时,我们得到一个新的错误:
/Users/user/Library/LaunchAgents/com.github.facebook.watchman.plist:不允许操作
其他人遇到jest watch
的问题?
常规npm t
将工作。
安装watchman
后,您可以通过sudo chown -R $(whoami):staff ~/Library/LaunchAgents
向发布代理商授予完全许可。
它将解决权限问题。
所以我们不得不在他的电脑上安装jest-cli
和watchman
......