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

Version 12.1 prints ENOENT no such file or directory #21202

Closed
1 of 15 tasks
muuvmuuv opened this issue Jun 25, 2021 · 3 comments · Fixed by #21203
Closed
1 of 15 tasks

Version 12.1 prints ENOENT no such file or directory #21202

muuvmuuv opened this issue Jun 25, 2021 · 3 comments · Fixed by #21203

Comments

@muuvmuuv
Copy link

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 12.0.x

Description

Just updated to 12.1 through ng update and now buildings seems to be unable to clear old files correctly. I always get errors like "ENOENT: no such file or directory" or "Error parsing bundle asset "/Volumes/Development/*/dist/aqua/main.f0babc2fd4603c54a819.js": no such file"

🔬 Minimal Reproduction

  1. ng new
  2. ng build

🔥 Exception or Error




[error] Error: ENOENT: no such file or directory, stat '/Volumes/Development/__temp/twelve-one/dist/twelve-one'
    at Object.statSync (node:fs:1526:3)
    at __node_internal_ (node:internal/fs/utils:767:8)
    at Object.rmdirSync (node:fs:1146:15)
    at Object.deleteOutputDir (/Volumes/Development/__temp/twelve-one/node_modules/@angular-devkit/build-angular/src/utils/delete-output-dir.js:21:10)
    at initialize (/Volumes/Development/__temp/twelve-one/node_modules/@angular-devkit/build-angular/src/browser/index.js:86:17)
    at async SwitchMapSubscriber.project (/Volumes/Development/__temp/twelve-one/node_modules/@angular-devkit/build-angular/src/browser/index.js:114:17)

🌍 Your Environment




Angular CLI: 12.1.0
Node: 16.3.0 (Unsupported)
Package Manager: npm 7.16.0
OS: darwin x64

Angular: 12.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1201.0
@angular-devkit/build-angular   12.1.0
@angular-devkit/core            12.1.0
@angular-devkit/schematics      12.1.0
@schematics/angular             12.1.0
rxjs                            6.6.7
typescript                      4.3.4

Anything else relevant?

@clydin
Copy link
Member

clydin commented Jun 25, 2021

This is due to a change in behavior in Node.js v16 which is not officially supported by Angular currently.
Switching to Node.js v14 should resolve the issue.
Alternatively, the deleteOutputPath may be set to false. However, depending on the project's overall build process, this may require manually removing the output directory.

@muuvmuuv
Copy link
Author

I totally forgot that I am running 16 already. Yes, this is true. I will disable it for now since I still want to benefit from Node 16 on my M1.

ShockwaveNN added a commit to ONLYOFFICE-QA/buguette that referenced this issue Jun 28, 2021
Update of angular broken on nodejs v16
But according to this:
angular/angular-cli#21202
Disabling this option is a good workaround
ShockwaveNN added a commit to ONLYOFFICE-QA/buguette that referenced this issue Jun 28, 2021
* Bump @angular-devkit/build-angular from 12.0.5 to 12.1.0

Bumps [@angular-devkit/build-angular](https://github.com/angular/angular-cli) from 12.0.5 to 12.1.0.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Commits](angular/angular-cli@v12.0.5...v12.1.0)

---
updated-dependencies:
- dependency-name: "@angular-devkit/build-angular"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Do not remove output path

Update of angular broken on nodejs v16
But according to this:
angular/angular-cli#21202
Disabling this option is a good workaround

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pavel Lobashov <shockwavenn@gmail.com>
alan-agius4 added a commit that referenced this issue Jun 28, 2021
alan-agius4 added a commit that referenced this issue Jun 28, 2021
…ors when deleting outputs

Closes #21202

(cherry picked from commit 9a751f0)
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants