You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some recent Pull Requests, the travis CI job running on windows is failing with the following error message:
Running mocha unit tests...
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|
The command "npm run test-coverage" exited with 1.
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'C:\Users\travis\build\mozilla\web-ext\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)
After some tests to be able to bisect what combination of node, npm and nyc is able to trigger the issue, I've been able to reproduce the same failure locally consistently and it looks related to something going wrong between nyc and the particular npm version being used (sigh :°-| ).
To identify the npm version that starts to trigger this issue I've executed the following command on windows 10 and git bash on multiple npm versions:
$ export NPMV=NN.N.N; rm -rf node_modules/; npx npm@$NPMV ci && npx npm@$NPMV run test-coverage
with the following results:
- npm@6.4.1 => OK
- npm@6.5.0 => OK
- npm@6.6.0 => OK
- npm@6.10.3 => OK
- npm@6.11.0 => BROKEN but different error
- npm@6.11.3 => BROKEN
- npm@6.12.0 => BROKEN
On npm@6.11.0 the error is:
> web-ext@3.2.0 test-coverage D:\MOZLAB\web-ext
> nyc npm run test
'find_dp0' is not recognized as an internal or external command,
operable program or batch file.
internal/modules/cjs/loader.js:573
throw err;
^
Error: Cannot find module 'D:\nyc\bin\nyc.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
at Function.Module._load (internal/modules/cjs/loader.js:497:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:719:10)
at startup (internal/bootstrap/node.js:228:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:575:3)
It also worth to notice that the issue looks to be actually introduced in the "npm ci" step, because running a version that wasn't affected based on the test described above on the node_modules/ directory created with an affected version leads to the same error.
The text was updated successfully, but these errors were encountered:
In some recent Pull Requests, the travis CI job running on windows is failing with the following error message:
After some tests to be able to bisect what combination of node, npm and nyc is able to trigger the issue, I've been able to reproduce the same failure locally consistently and it looks related to something going wrong between
nyc
and the particularnpm
version being used (sigh :°-| ).To identify the npm version that starts to trigger this issue I've executed the following command on windows 10 and git bash on multiple npm versions:
with the following results:
On npm@6.11.0 the error is:
It also worth to notice that the issue looks to be actually introduced in the "npm ci" step, because running a version that wasn't affected based on the test described above on the node_modules/ directory created with an affected version leads to the same error.
The text was updated successfully, but these errors were encountered: