jeantimex / jeantimex/javascript-problems-and-solutions
npm run mocha
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 539
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Description
It seems the problem of the version of babel-xxx. But I just can solve it, maybe who can help me 😂, thx.
npm run mocha
error output:
> javascript-problems-and-solutions@2.0.1 mocha /Users/mac/Downloads/play_catch/javascript-problems-and-solutions
> cross-env NODE_ENV=test ./node_modules/.bin/nyc mocha ./src/**/*$FILE*-test.js
/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_@babel_helper-plugin-utils@7.8.3@@babel/helper-plugin-utils/lib/index.js:72
throw Object.assign(err, {
^
Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.
at throwVersionError (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_@babel_helper-plugin-utils@7.8.3@@babel/helper-plugin-utils/lib/index.js:65:11)
at Object.assertVersion (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_@babel_helper-plugin-utils@7.8.3@@babel/helper-plugin-utils/lib/index.js:13:11)
at /Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-plugin-istanbul@5.2.0@babel-plugin-istanbul/lib/index.js:68:7
at /Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_@babel_helper-plugin-utils@7.8.3@@babel/helper-plugin-utils/lib/index.js:19:12
at Function.memoisePluginContainer (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-core@6.26.3@babel-core/lib/transformation/file/options/option-manager.js:113:13)
at Function.normalisePlugin (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-core@6.26.3@babel-core/lib/transformation/file/options/option-manager.js:146:32)
at /Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-core@6.26.3@babel-core/lib/transformation/file/options/option-manager.js:184:30
at Array.map (<anonymous>)
at Function.normalisePlugins (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-core@6.26.3@babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-core@6.26.3@babel-core/lib/transformation/file/options/option-manager.js:234:36)
at OptionManager.init (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-core@6.26.3@babel-core/lib/transformation/file/options/option-manager.js:368:12)
at compile (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-register@6.26.0@babel-register/lib/node.js:103:45)
at loader (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-register@6.26.0@babel-register/lib/node.js:144:14)
at require.extensions.<computed> (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-register@6.26.0@babel-register/lib/node.js:154:7)
at Object.<anonymous> (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_nyc@13.3.0@nyc/node_modules/append-transform/index.js:62:4)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at /Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_mocha@5.2.0@mocha/lib/mocha.js:250:27
at Array.forEach (<anonymous>)
at Mocha.loadFiles (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_mocha@5.2.0@mocha/lib/mocha.js:247:14)
at Mocha.run (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_mocha@5.2.0@mocha/lib/mocha.js:576:10)
at Object.<anonymous> (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_mocha@5.2.0@mocha/bin/_mocha:637:18)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Module.replacementCompile (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_nyc@13.3.0@nyc/node_modules/append-transform/index.js:58:13)
at Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at /Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_nyc@13.3.0@nyc/node_modules/append-transform/index.js:62:4
at require.extensions.<computed> (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-register@6.26.0@babel-register/lib/node.js:152:7)
at Object.<anonymous> (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_nyc@13.3.0@nyc/node_modules/append-transform/index.js:62:4)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at runMain (/Users/mac/.node-spawn-wrap-55539-79d3b4bf85d8/node:68:10)
at Function.<anonymous> (/Users/mac/.node-spawn-wrap-55539-79d3b4bf85d8/node:171:5)
at Object.<anonymous> (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_nyc@13.3.0@nyc/bin/wrap.js:23:4)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at /Users/mac/.node-spawn-wrap-55539-79d3b4bf85d8/node:178:8
at Object.<anonymous> (/Users/mac/.node-spawn-wrap-55539-79d3b4bf85d8/node:181:3)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'BABEL_VERSION_UNSUPPORTED',
version: '6.26.3',
range: '^7.0.0-0'
}
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! javascript-problems-and-solutions@2.0.1 mocha: `cross-env NODE_ENV=test ./node_modules/.bin/nyc mocha ./src/**/*$FILE*-test.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the javascript-problems-and-solutions@2.0.1 mocha 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/mac/.npm/_logs/2020-03-31T05_35_08_282Z-debug.log
✘ RandomYang ~/Downloads/play_catch/javascript-problems-and-solutions master ● npm run mocha >> output.txt
/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_@babel_helper-plugin-utils@7.8.3@@babel/helper-plugin-utils/lib/index.js:72
throw Object.assign(err, {
^
Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.
at throwVersionError (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_@babel_helper-plugin-utils@7.8.3@@babel/helper-plugin-utils/lib/index.js:65:11)
at Object.assertVersion (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_@babel_helper-plugin-utils@7.8.3@@babel/helper-plugin-utils/lib/index.js:13:11)
at /Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-plugin-istanbul@5.2.0@babel-plugin-istanbul/lib/index.js:68:7
at /Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_@babel_helper-plugin-utils@7.8.3@@babel/helper-plugin-utils/lib/index.js:19:12
at Function.memoisePluginContainer (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-core@6.26.3@babel-core/lib/transformation/file/options/option-manager.js:113:13)
at Function.normalisePlugin (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-core@6.26.3@babel-core/lib/transformation/file/options/option-manager.js:146:32)
at /Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-core@6.26.3@babel-core/lib/transformation/file/options/option-manager.js:184:30
at Array.map (<anonymous>)
at Function.normalisePlugins (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-core@6.26.3@babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-core@6.26.3@babel-core/lib/transformation/file/options/option-manager.js:234:36)
at OptionManager.init (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-core@6.26.3@babel-core/lib/transformation/file/options/option-manager.js:368:12)
at compile (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-register@6.26.0@babel-register/lib/node.js:103:45)
at loader (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-register@6.26.0@babel-register/lib/node.js:144:14)
at require.extensions.<computed> (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-register@6.26.0@babel-register/lib/node.js:154:7)
at Object.<anonymous> (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_nyc@13.3.0@nyc/node_modules/append-transform/index.js:62:4)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at /Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_mocha@5.2.0@mocha/lib/mocha.js:250:27
at Array.forEach (<anonymous>)
at Mocha.loadFiles (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_mocha@5.2.0@mocha/lib/mocha.js:247:14)
at Mocha.run (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_mocha@5.2.0@mocha/lib/mocha.js:576:10)
at Object.<anonymous> (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_mocha@5.2.0@mocha/bin/_mocha:637:18)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Module.replacementCompile (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_nyc@13.3.0@nyc/node_modules/append-transform/index.js:58:13)
at Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at /Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_nyc@13.3.0@nyc/node_modules/append-transform/index.js:62:4
at require.extensions.<computed> (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_babel-register@6.26.0@babel-register/lib/node.js:152:7)
at Object.<anonymous> (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_nyc@13.3.0@nyc/node_modules/append-transform/index.js:62:4)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at runMain (/Users/mac/.node-spawn-wrap-55735-b4037327ec73/node:68:10)
at Function.<anonymous> (/Users/mac/.node-spawn-wrap-55735-b4037327ec73/node:171:5)
at Object.<anonymous> (/Users/mac/Downloads/play_catch/javascript-problems-and-solutions/node_modules/_nyc@13.3.0@nyc/bin/wrap.js:23:4)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at /Users/mac/.node-spawn-wrap-55735-b4037327ec73/node:178:8
at Object.<anonymous> (/Users/mac/.node-spawn-wrap-55735-b4037327ec73/node:181:3)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'BABEL_VERSION_UNSUPPORTED',
version: '6.26.3',
range: '^7.0.0-0'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! javascript-problems-and-solutions@2.0.1 mocha: `cross-env NODE_ENV=test ./node_modules/.bin/nyc mocha ./src/**/*$FILE*-test.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the javascript-problems-and-solutions@2.0.1 mocha 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/mac/.npm/_logs/2020-03-31T05_36_12_260Z-debug.log
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running npm run mocha and inspect the Babel-related dependency and test configuration implicated by the error. The command targets ./src/**/*$FILE*-test.js; done means the Babel version mismatch is resolved and the Mocha suite runs successfully with coverage instead of failing before tests load.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100