Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module nyc.CMD when running jenkins-mocha #29

Open
shaunluttin opened this issue May 19, 2017 · 3 comments
Open

Cannot find module nyc.CMD when running jenkins-mocha #29

shaunluttin opened this issue May 19, 2017 · 3 comments

Comments

@shaunluttin
Copy link

shaunluttin commented May 19, 2017

Mocha works when called on its own but fails when called via jenkins-mocha. In other words:

.\node_modules\.bin\mocha .\test\test-unit\*.js
.\node_modules\.bin\jenkins-mocha .\test\test-unit\*.js      <--- BOOM

The problem is that node cannot resolve nyc.CMD, because it is blurring relative and absolute paths.

module.js:457
    throw err; 
    ^ 

Error: Cannot find module 'C:\srcbd\'C:\srcbd\node_modules\.bin\nyc.CMD''  
    at Function.Module._resolveFilename (module.js:455:15) 
    at Function.Module._load (module.js:403:25)          
    at Module.runMain (module.js:590:10)                    
    at run (bootstrap_node.js:394:7)           
    at startup (bootstrap_node.js:149:9)                
    at bootstrap_node.js:509:3       

Environment

Windows 10
node v6.6.0
jenkins-mocha: 4.1.2
@michaelschneiderdaimler

any workaround/resulution yet?

@shaunluttin
Copy link
Author

shaunluttin commented Aug 17, 2017

@michaelschneiderdaimler We ended up using nyc directly with mocha.

https://github.com/istanbuljs/nyc

The simplest usage from the command line looks something like this:

$ nyc mocha .\some-test.js

@Zaky7
Copy link
Contributor

Zaky7 commented Mar 19, 2020

This is happening on Windows host only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants