Prerequisites
Description
Steps to Reproduce
Expected behavior: [What you expect to happen]
config file should load from the given custom location
Actual behavior: [What actually happens]
Getting issue as below
mocha --no-opts --config node_modules/ace-api-testlib/lib/.mocharc.js --reporter mocha-allure-reporter "
/Users/ajadeja/git_test/ace-ilp-lib/node_modules/mocha/lib/cli/config.js:63
throw new Error(failed to parse ${filepath}: ${err});
^
Error: failed to parse node_modules/ace-api-testlib/lib/.mocharc.js: Error: Cannot find module 'node_modules/ace-api-testlib/lib/.mocharc.js'
at exports.loadConfig.filepath (/Users/ajadeja/git_test/ace-ilp-lib/node_modules/mocha/lib/cli/config.js:63:11)
at loadRc (/Users/ajadeja/git_test/ace-ilp-lib/node_modules/mocha/lib/cli/options.js:229:21)
at loadOptions (/Users/ajadeja/git_test/ace-ilp-lib/node_modules/mocha/lib/cli/options.js:299:20)
at Object. (/Users/ajadeja/git_test/ace-ilp-lib/node_modules/mocha/bin/mocha:29:14)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
npm ERR! code ELIFECYCLE
Reproduces how often: [What percentage of the time does it reproduce?]
Versions
-
The output of mocha --version and node node_modules/.bin/mocha --version:
% mocha --version
6.0.2
-
The output of node --version:
% node --version
v8.11.1
-
Your operating system
- name and version: macOSHighSierra 10.13.6
- architecture (32 or 64-bit):
-
Your shell (e.g., bash, zsh, PowerShell, cmd): bash
-
Your browser and version (if running browser tests):
-
Any third-party Mocha-related modules (and their versions):
-
Any code transpiler (e.g., TypeScript, CoffeeScript, Babel) being used (and its version):
Additional Information
Prerequisites
faqlabelnode node_modules/.bin/mocha --version(Local) andmocha --version(Global). We recommend that you not install Mocha globally.Description
Steps to Reproduce
Expected behavior: [What you expect to happen]
config file should load from the given custom location
Actual behavior: [What actually happens]
Getting issue as below
/Users/ajadeja/git_test/ace-ilp-lib/node_modules/mocha/lib/cli/config.js:63
throw new Error(
failed to parse ${filepath}: ${err});^
Error: failed to parse node_modules/ace-api-testlib/lib/.mocharc.js: Error: Cannot find module 'node_modules/ace-api-testlib/lib/.mocharc.js'
at exports.loadConfig.filepath (/Users/ajadeja/git_test/ace-ilp-lib/node_modules/mocha/lib/cli/config.js:63:11)
at loadRc (/Users/ajadeja/git_test/ace-ilp-lib/node_modules/mocha/lib/cli/options.js:229:21)
at loadOptions (/Users/ajadeja/git_test/ace-ilp-lib/node_modules/mocha/lib/cli/options.js:299:20)
at Object. (/Users/ajadeja/git_test/ace-ilp-lib/node_modules/mocha/bin/mocha:29:14)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
npm ERR! code ELIFECYCLE
Reproduces how often: [What percentage of the time does it reproduce?]
Versions
The output of
mocha --versionandnode node_modules/.bin/mocha --version:% mocha --version
6.0.2
The output of
node --version:% node --version
v8.11.1
Your operating system
Your shell (e.g., bash, zsh, PowerShell, cmd): bash
Your browser and version (if running browser tests):
Any third-party Mocha-related modules (and their versions):
Any code transpiler (e.g., TypeScript, CoffeeScript, Babel) being used (and its version):
Additional Information