Closed
Description
🐞 Bug report
Command (mark with an x
)
- new
- [ x] build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Description
After updating to 12.0.1, production build process ends with the following error:
Error: Unable to write stats file: ENOENT: no such file or directory, mkdir 'D:\angular\project-root\C:\Users\Fausto\AppData\Local\Temp\angular-cli-i18n-0ocG5L'
I have tried to locate the problem, but without success.
Somewhere, the path to the temporary folder gets corrupted.
Until here: (https://github.com/angular/angular-devkit-build-angular-builds/blob/master/src/utils/i18n-options.js)
// If inlining store the output in a temporary location to facilitate post-processing
if (i18n.shouldInline) {
const tempPath = fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()), 'angular-cli-i18n-'));
buildOptions.outputPath = tempPath;
// Remove temporary directory used for i18n processing
process.on('exit', () => {
try {
rimraf.sync(tempPath);
}
catch { }
});
}
All is correct.
🌍 Your Environment
Angular CLI: 11.0.3
Node: v14.16.0
OS: windows 10 x64
Angular: 12.0.1
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
---------------------------------------------------------
@angular-devkit/build-angular 12.0.1
@angular-devkit/build-optimizer": "~0.1200.1",
@angular/cli": "12.0.1",
@angular/compiler-cli": "12.0.1",
typescript 4.2.4
Activity
alan-agius4 commentedon May 25, 2021
As a workaround you can disable
statsJson
which is also not recommended to be used unless you are debugging. As stats generation can impact the duration of the build.fix(@angular-devkit/build-angular): resolve absolute outputPath properly
fix(@angular-devkit/build-angular): resolve absolute outputPath properly
angular-automatic-lock-bot commentedon Jun 26, 2021
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.