jest --watch(npm t - --watch)抛出错误

问题描述 投票:1回答:2

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将工作。

node.js reactjs jestjs watchman
2个回答
0
投票

安装watchman后,您可以通过sudo chown -R $(whoami):staff ~/Library/LaunchAgents向发布代理商授予完全许可。 它将解决权限问题。


-1
投票

所以我们不得不在他的电脑上安装jest-cliwatchman ......

© www.soinside.com 2019 - 2024. All rights reserved.