2016-04-01 75 views
1

我現在無法運行測試,我能夠在jests教程頁上運行基本的sum.js測試,但無法測試我的反應代碼。我在其他網站上看到,移動節點4.x修復了這個問題,但不適合我。任何幫助表示讚賞。無法運行測試,打開太多文件

C:\ WAMP \ WWW \ ccRelaunchWorkspace>節點-v V4.3.0

我運行Windows 7

"devDependencies": { 
    "babel-jest": "^9.0.0", 
    "babel-polyfill": "*", 
    "babel-preset-es2015": "*", 
    "babel-preset-react": "*", 
    "jest-cli": "*", 
    "react-addons-test-utils": "~0.14.0" 
    }, 
    "scripts": { 
    "test": "jest" 
    }, 
    "jest": { 
    "scriptPreprocessor": "./node_modules/babel-jest", 
    "unmockedModulePathPatterns": [ 
     "./node_modules/react", 
     "./node_modules/react-dom", 
     "./node_modules/react-addons-test-utils" 
    ] 
    }, 

錯誤:

Using Jest CLI v0.7.0 
Error reading file: `C:\wamp\www\ccRelaunchWorkspace\node_modules\babel-preset-e 
s2015\node_modules\babel-plugin-transform-es2015-parameters\node_modules\babel-t 
raverse\node_modules\babel-code-frame\node_modules\chalk\node_modules\ansi-style 
s\package.json` 
C:\wamp\www\ccRelaunchWorkspace\node_modules\jest-cli\node_modules\node-haste\li 
b\loader\ResourceLoader.js:88 
     throw err; 
    ^

Error: EMFILE: too many open files, open 'C:\wamp\www\ccRelaunchWorkspace\node_m 
odules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-parameters 
\node_modules\babel-traverse\node_modules\babel-code-frame\node_modules\chalk\no 
de_modules\ansi-styles\package.json' 
    at Error (native) 
npm ERR! Test failed. See above for more details. 
npm ERR! not ok code 0 

回答

0

我已經完全刪除所有模塊,並將我的所有模塊都移動到dependencies中,而不是在devDependencies中有一些模塊,並刪除了任何與之相關的和用*替換版本,然後運行npm install