devcontainers-contrib / features

🐳 Extra add-in features for Devcontainers and GitHub Codespaces
MIT License
240 stars 126 forks source link

[Bug]: Angular CLI v11.2.12 freezes Dev Container creation #553

Open dineiar opened 10 months ago

dineiar commented 10 months ago

Feature id and version

ghcr.io/devcontainers-contrib/features/angular-cli:2

Devcontainer base Image

mcr.microsoft.com/devcontainers/typescript-node:14-bullseye

What happened?

I added ghcr.io/devcontainers-contrib/features/angular-cli:2 feature with "version": "11.2.12", but the extension freezes when trying to build the Dev Container because there is an interactive question regarding sharing anonymous usage data with Angular Team (see log output).

If I remove the feature and put npm i -g @angular/cli@11.2.19 in the postCreateCommand, the same message shows up but I can interact with it and proceed with container creation. The workaround is to add export NG_CLI_ANALYTICS=ci before the npm install command (source).

I have "cli": { "analytics": false } on my angular.json, however, I am using the dev container in a parent folder with two angular projects on subfolders, so there is no angular.json file in the root folder of the dev container.

Relevant log output

? Would you like to share anonymous usage data with the Angular Team at Google under
Google’s Privacy Policy at https://policies.google.com/privacy? For more details and
how to change this setting, see https://angular.io/analytics. (y/N)