reactjs - 反应测试错误
问题描述
我第一次尝试在 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$
解决方案
请参阅此 Github 问题。brew install watchman
在命令行中运行。
推荐阅读
- c - 如何在 EFI 图形模式下使用文本?
- git - 有没有办法仅将另一个 repo 的 master 镜像到非 master 分支?
- python - Pandas - AttributeError:“NoneType”对象没有属性“管道”
- linux - zip 在终端中有效,但在脚本中无效?
- function - 如何修复程序集中的“未处理的异常”错误?
- python - 从嵌套字典中删除所有出现的值
- kubernetes - Kubernetes 上的 IBM 文件存储卡在“待处理”
- regex - 前瞻密码的正则表达式
- url - 在 URL 中使用表情符号和星号 * 是否安全?
- mysql - 如何避免 MySQL 中的特定字符