2015-05-19 77 views
0

我試圖運行一些開玩笑測試,但不斷收到錯誤:錯誤運行笑話反應測試,開玩笑不承認

「開玩笑」不被識別爲一個內部或外部命令,可操作的程序或批處理文件。

這是我的package.json,任何人都可以請幫助讓我的測試框架設置?

{ 
"name": "lac-react", 
"version": "0.0.0", 
"description": "", 
"main": "index.js", 
"scripts": { 
"test": "jest" 
}, 
"author": "", 
"license": "ISC", 
"devDependencies": { 
    "browserify": "^9.0.8", 
    "gulp": "^3.8.11", 
    "gulp-concat": "^2.5.2", 
    "gulp-cssmin": "^0.1.7", 
    "gulp-react": "^3.0.1", 
    "gulp-rename": "^1.2.2", 
    "gulp-streamify": "0.0.5", 
    "gulp-uglify": "^1.2.0", 
    "gulp-watch": "^4.2.4", 
    "reactify": "^1.1.0", 
    "vinyl-source-stream": "^1.1.0", 
    "watchify": "^3.2.1" 
}, 
"jest": { 
    "scriptPreprocessor": "./preprocessor.js", 
    "unmockedModulePathPatterns": [ 
    "react" 
    ], 
    "testPathDirs": [ 
    "./src/components/__tests__/" 
    ] 
}, 
"dependencies": { 
    "moment": "^2.10.2", 
    "react": "^0.13.2", 
    "react-datepicker": "^0.6.2", 
    "react-message": "^1.3.0", 
    "react-router": "^0.13.3", 
    "react-skylight": "^0.2.0", 
    "superagent": "^1.2.0", 
    "react": "*", 
    "react-tools": "*", 
    "jest-cli": "*" 
} 
} 

回答

0

望着錯誤越近,我有這樣的:

error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, p lease install Visual Studio 2010 build tools. 

我與添加的構建工具的版本做一個NPM時,固定該安裝:

--msvs_version=2013 

所有作品現在好了。

你也可以通過添加變量的系統解決這個問題

enter image description here