August 29

0 comments

NG Add hanging fixed

By Christopher G Mendla

August 29, 2022


Last Updated on August 29, 2022 by Christopher G Mendla

NG Add was hanging in a new installation on Windows 11. The fix was simple.

The Problem – ng add was hanging

I wanted to install ESLint on a new installation of Angular running under Windows 11. The command would just hang. If you try to run ESLint and it isn’t installed, Angular will give you the option to install it

The Solution – Clear the cache

The solution was very simple, run

npm cache clean --force

After the cache was cleared, ng add ran as expected.

ng add @angular-eslint/schematics
ℹ Using package manager: npm
✔ Found compatible package version: @angular-eslint/[email protected].
✔ Package information loaded.

The package @angular-eslint/[email protected] will be installed and executed.
Would you like to proceed? Yes
✔ Packages successfully installed.
    
    All @angular-eslint dependencies have been successfully installed 🎉
    
    Please see https://github.com/angular-eslint/angular-eslint for how to add ESLint configuration to your project.
    
    We detected that you have a single project in your workspace and no existing linter wired up, so we are configuring ESLint for you automatically.

    Please see https://github.com/angular-eslint/angular-eslint for more information.

CREATE .eslintrc.json (984 bytes)
UPDATE package.json (1420 bytes)
UPDATE angular.json (3263 bytes)
✔ Packages installed successfully.

Summary

Clearing the cache solved the hanging ng add

Christopher G Mendla

About the author

A web developer living in Southampton, PA

Self motivated critical thinker and problem solver providing technology consulting services.

Leave a Reply

Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}