首页 > 解决方案 > 反应测试错误

问题描述

我第一次尝试在 react 中运行一些测试,但是我收到了一些错误,并且不知道这些是什么。

2018-05-30 16:47 node[3217] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2018-05-30 16:47 node[3217] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2018-05-30 16:47 node[3217] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: Error watching file for changes: EMFILE
    at _errnoException (util.js:1022:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1359:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! isomorphic@2.6.0 test: `react-app-rewired test --env=jsdom`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the isomorphic@2.6.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/EcoSurvUser/.npm/_logs/2018-05-30T15_47_27_998Z-debug.log
Alessandros-MacBook-Pro-2:isomorphic_immutable_js EcoSurvUser$ 

标签: reactjsunit-testingtestingjestjsenzyme

解决方案


请参阅此 Github 问题brew install watchman在命令行中运行。


推荐阅读