尝试设置我的react starter Kit项目以在代码上设置CI,并且该项目在本地工作正常。当我尝试在代码上运行npm测试时,我收到以下错误mocha --require babel-register
。
我的测试命令
...
"babel": {
"presets": [
"react",
"stage-0"
],
"plugins": [
"syntax-trailing-function-commas",
"transform-async-to-generator",
"transform-es2015-destructuring",
"transform-es2015-parameters",
"transform-es2015-duplicate-keys",
"transform-es2015-modules-commonjs",
"transform-exponentiation-operator",
"transform-runtime"
],
"env": {
"test": {
"plugins": [
"rewire"
]
}
}
},
"dependencies": {
"apollo-client": "^0.5.20",
"babel-polyfill": "6.16.0",
"babel-runtime": "6.18.0",
"bluebird": "3.4.6",
"body-parser": "1.15.2",
"braintree": "^1.46.0",
"classnames": "^2.2.5",
"cookie-parser": "1.4.3",
"core-js": "2.4.1",
"express": "4.14.0",
"express-graphql": "0.6.1",
"express-jwt": "5.1.0",
"fastclick": "1.0.6",
"fbjs": "0.8.6",
"front-matter": "2.1.1",
"graphql": "0.8.2",
"graphql-tag": "^1.1.2",
"history": "4.4.0",
"isomorphic-fetch": "^2.2.1",
"isomorphic-style-loader": "1.1.0",
"jsonwebtoken": "7.1.9",
"markdown-it": "8.1.0",
"moment": "^2.17.1",
"node-fetch": "1.6.3",
"normalize.css": "5.0.0",
"passport": "0.3.2",
"passport-auth0": "^0.6.0",
"passport-facebook": "2.1.1",
"pretty-error": "2.0.2",
"query-string": "4.2.3",
"react": "15.4.1",
"react-apollo": "^0.7.1",
"react-dom": "15.4.1",
"react-redux": "4.4.5",
"react-slick": "^0.14.5",
"react-stack-grid": "^0.1.1",
"redux": "3.6.0",
"redux-actions": "^1.1.0",
"redux-form": "^6.3.2",
"redux-logger": "2.7.4",
"redux-thunk": "2.1.0",
"serialize-javascript": "1.3.0",
"source-map-support": "0.4.6",
"speakingurl": "11.0.0",
"universal-router": "2.0.0",
"uploadcare-widget": "^2.10.2",
"whatwg-fetch": "2.0.1",
"xml2js": "^0.4.17"
},
"devDependencies": {
"assets-webpack-plugin": "^3.5.0",
"autoprefixer": "^6.5.3",
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.8",
"babel-plugin-rewire": "^1.0.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-latest": "^6.16.0",
"babel-preset-react": "^6.16.0",
"babel-preset-react-optimize": "^1.0.1",
"babel-preset-stage-0": "^6.16.0",
"babel-register": "^6.18.0",
"babel-template": "^6.16.0",
"babel-types": "^6.19.0",
"browser-sync": "^2.18.2",
"chai": "^3.5.0",
"css-loader": "^0.26.0",
"enzyme": "^2.6.0",
"eslint": "^3.10.2",
"eslint-config-airbnb": "^13.0.0",
"eslint-loader": "^1.6.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.7.1",
"extend": "^3.0.0",
"file-loader": "^0.9.0",
"gaze": "^1.1.2",
"git-repository": "^0.1.4",
"glob": "^7.1.1",
"json-loader": "^0.5.4",
"mkdirp": "^0.5.1",
"mocha": "^3.1.2",
"pixrem": "^3.0.2",
"pleeease-filters": "^3.0.0",
"postcss": "^5.2.5",
"postcss-calc": "^5.3.1",
"postcss-color-function": "^2.0.1",
"postcss-custom-media": "^5.0.1",
"postcss-custom-properties": "^5.0.1",
"postcss-custom-selectors": "^3.0.0",
"postcss-flexbugs-fixes": "^2.0.0",
"postcss-loader": "^1.1.1",
"postcss-media-minmax": "^2.1.2",
"postcss-nested": "^1.0.0",
"postcss-nesting": "^2.3.1",
"postcss-partial-import": "^2.1.0",
"postcss-pseudoelements": "^3.0.0",
"postcss-selector-matches": "^2.0.5",
"postcss-selector-not": "^2.0.0",
"postcss-url": "^5.1.2",
"raw-loader": "^0.5.1",
"react-addons-test-utils": "15.4.0",
"react-deep-force-update": "^2.0.1",
"react-hot-loader": "^3.0.0-beta.6",
"redbox-react": "^1.3.3",
"redux-mock-store": "^1.2.1",
"rimraf": "^2.5.4",
"sinon": "^2.0.0-pre.3",
"stylelint": "^7.6.0",
"stylelint-config-standard": "^15.0.0",
"url-loader": "^0.5.7",
"webpack": "^1.13.3",
"webpack-hot-middleware": "^2.13.2",
"webpack-middleware": "^1.5.1"
},
如何配置代码行环境以使其正常工作?
的package.json
'Account for any OOO
Dim schdOff As Range
For Each schdOff In Range("H2:H8")
If schdOff.Value > 0 And schdOff.Value < 0.373611111111111 Then
Dim int1 As Integer
Dim stPrompt As String
Cells(schdOff.Row, 1).Resize(, 1).Interior.Color = 65535
stPrompt = "Was the highlighted analyst scheduled to be short time?"
in1 = MsgBox(stPrompt, vbYesNo)
If int1 = vbYes Then
schdOff.FormatConditions.Delete
schdOff.Interior.Color = 11711154
Else
schdOff.FormatConditions.Delete
schdOff.Interior.Color = 5263615
End If
Cells(schdOff.Row, 1).Resize(, 1).Interior.Color = 16777215
ElseIf schdOff.Value = 0 Then
Dim int2 As Integer
Dim sPrompt As String
Cells(schdOff.Row, 1).Resize(, 18).Interior.Color = 65535
sPrompt = "Was the highlighted analyst scheduled to be off?"
int2 = MsgBox(sPrompt, vbYesNo)
If int2 = vbYes Then
Cells(schdOff.Row, 1).Resize(, 18).FormatConditions.Delete
Cells(schdOff.Row, 1).Resize(, 18).Interior.Color = 11711154
Else
Cells(schdOff.Row, 1).Resize(, 18).FormatConditions.Delete
Cells(schdOff.Row, 1).Resize(, 18).Interior.Color = 5263615
End If
End If
Next schdOff