Error: Cannot find module 'C:\Dev\myApp\node'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
But if the test script run without nyc, like env-cmd mocha - all is good.
Option use-shell doesn't help either.
Solution - Update nyc to the latest - and it is working again. Not sure if it is nyc issue or env-cmd
env-cmd fails to run the command script with nyc@11.9.
npm script:
Error: internal/modules/cjs/loader.js:638 throw err; ^
Error: Cannot find module 'C:\Dev\myApp\node' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
But if the test script run without
nyc
, likeenv-cmd mocha
- all is good.Option
use-shell
doesn't help either.Solution - Update
nyc
to the latest - and it is working again. Not sure if it isnyc
issue orenv-cmd