![](/img/trans.png)
[英]Jest: `npm test` not displaying "Watch Usage" options in Windows Git Bash
[英]jest --watch (npm t — --watch) throwing errors
節點[1265](FSEvents.framework)FSEventStreamStart:register_with_server:錯誤:f2d_register_rpc()=>(空)(-22)
運行npm t -- --watch
時會發生這種情況。 在我的系統節點v7.4.0上,它可以正常工作。 在我的同事(節點v7.9)上,它失敗了。
這里的問題問的是確切的問題:
使用Jest進行測試失敗,並顯示錯誤:監視文件是否有錯誤: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
授予啟動代理完全權限。
它將解決權限問題。
因此,我們不得不在其計算機上與watchman
一起安裝jest-cli
...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.