-
Notifications
You must be signed in to change notification settings - Fork 12k
Running test with --code-coverage fail with @angular-devkit/build-angular 14.0.3 #23467
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
Comments
Can you share the test section of your |
Sure. That being said, tests runs correctly without --code-coverage "test": { "configurations": { "ci": { "karmaConfig": "projects/investors/karma.conf.ci.js" } }, "builder": "@angular-devkit/build-angular:karma", "options": { "main": "projects/investors/src/test.ts", "polyfills": "projects/investors/src/polyfills.ts", "tsConfig": "projects/investors/tsconfig.spec.json", "karmaConfig": "projects/investors/karma.conf.js", "codeCoverageExclude": [ "/**/*.module.ts", "/**/providers.ts" ] } }, |
In general we don’t expect paths to start with a forward slash. As a workaround you could remove the leading We should disallow mounting of globs starting with forward slash. |
You think it's only that ? I'll try |
Yes |
…s that start with a forward slash By default, a glob pattern starting with a forward slash will be "mounted" onto the system root. This causes globs to escape the workspace root. With this change we configure disable glob "mounting". Closes angular#23467
…s that start with a forward slash By default, a glob pattern starting with a forward slash will be "mounted" onto the system root. This causes globs to escape the workspace root. With this change we configure disable glob "mounting". Closes angular#23467
…s that start with a forward slash By default, a glob pattern starting with a forward slash will be "mounted" onto the system root. This causes globs to escape the workspace root. With this change we configure disable glob "mounting". Closes angular#23467
…s that start with a forward slash By default, a glob pattern starting with a forward slash will be "mounted" onto the system root. This causes globs to escape the workspace root. With this change we configure disable glob "mounting" and also change the root to the same setting of the `cwd`. Closes angular#23467
…s that start with a forward slash By default, a glob pattern starting with a forward slash will be "mounted" onto the system root. This causes globs to escape the workspace root. With this change we configure disable glob "mounting" and also change the root to the same setting of the `cwd`. Closes #23467
…s that start with a forward slash By default, a glob pattern starting with a forward slash will be "mounted" onto the system root. This causes globs to escape the workspace root. With this change we configure disable glob "mounting" and also change the root to the same setting of the `cwd`. Closes #23467 (cherry picked from commit 7a24609)
I does fix the problem, thank you really much! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)ng test --code-coverage
Is this a regression?
Yes. @angular-devkit/build-angular 14.0.2 works as expected.
Description
An error is thrown when running tests.
🔬 Minimal Reproduction
Just run test with code coverage
🔥 Exception or Error
⠋ Generating browser application bundles (phase: setup)...An unhandled exception occurred: EACCES: permission denied, scandir '/boot/efi'
And the angular log contain :
[error] Error: EACCES: permission denied, scandir '/boot/efi'
at Object.readdirSync (node:fs:1405:3)
at GlobSync._readdir (/home/damob/projects/pm2/frontend/node_modules/@angular-devkit/build-angular/node_modules/glob/sync.js:288:46)
at GlobSync._readdirInGlobStar (/home/damob/projects/pm2/frontend/node_modules/@angular-devkit/build-angular/node_modules/glob/sync.js:267:20)
at GlobSync._readdir (/home/damob/projects/pm2/frontend/node_modules/@angular-devkit/build-angular/node_modules/glob/sync.js:276:17)
at GlobSync._processReaddir (/home/damob/projects/pm2/frontend/node_modules/@angular-devkit/build-angular/node_modules/glob/sync.js:137:22)
at GlobSync._process (/home/damob/projects/pm2/frontend/node_modules/@angular-devkit/build-angular/node_modules/glob/sync.js:132:10)
at GlobSync._processGlobStar (/home/damob/projects/pm2/frontend/node_modules/@angular-devkit/build-angular/node_modules/glob/sync.js:380:10)
at GlobSync._process (/home/damob/projects/pm2/frontend/node_modules/@angular-devkit/build-angular/node_modules/glob/sync.js:130:10)
at GlobSync._processGlobStar (/home/damob/projects/pm2/frontend/node_modules/@angular-devkit/build-angular/node_modules/glob/sync.js:383:10)
at GlobSync._process (/home/damob/projects/pm2/frontend/node_modules/@angular-devkit/build-angular/node_modules/glob/sync.js:130:10)
🌍 Your Environment
The text was updated successfully, but these errors were encountered: