1

I have a new computer (it worked on my previous computer) and installed angular via cli and when looking at the information on the version the Angular: appeared and I tried doing the same steps as this post (link) but they didn't work and I'm stuck on what to do next. I need this version for an existing project I am working on.

PS C:\Users\pnguy10\middleware-ui> ng v

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 11.2.19
Node: 16.20.0
OS: win32 x64

Angular: <error>
... animations, cdk, common, compiler, compiler-cli, core
... flex-layout, forms, material, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.19 (cli-only)
@angular-devkit/build-angular   0.1102.19 (cli-only)
@angular-devkit/core            11.2.19 (cli-only)
@angular-devkit/schematics      11.2.19 (cli-only)
@angular/cli                    11.2.19 (cli-only)
@schematics/angular             11.2.19 (cli-only)
@schematics/update              0.1102.19 (cli-only)
rxjs                            6.6.3 (cli-only)
typescript                      4.1.6 (cli-only)
webpack                         4.46.0 (cli-only)

I have npm version 7.24.0 to be supported for angular 11.2.19.

I've tried the below: Delete node_modules folder and package-lock.json:

rm -rf node_modules
rm package-lock.json

Then install all packages again:

npm i

Reinstall the angular devkit:

npm install @angular-devkit/[email protected]

Uninstalling and re-installing angular cli or angular-devkit/build-angular: Uninstall commands:

npm uninstall -g @angular/cli
npm cache clean --force
npm cache verify

Re-install commands:

npm install -g @angular/[email protected]
npm install -g @angular-devkit/[email protected]

Sometimes I will also use

npm i 

and it'll upgrade the Angular CLI version to 16.xx.xx and that version is too high for the project.

I also tried setting this: npm config delete registry then re-installing but it didn't work.

Nothing is working and I'm still getting the error! Please help!

EDIT: After installing npm install -g @angular/[email protected] the below showed.

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 11.2.19
Node: 16.20.0
OS: win32 x64

Angular: 11.2.14 (cli-only)
... core
Ivy Workspace: Yes

Package                             Version
-------------------------------------------------------------
@angular-devkit/architect           0.1102.19 (cli-only)
@angular-devkit/build-angular       0.1102.19 (cli-only)
@angular-devkit/core                11.2.19 (cli-only)
@angular-devkit/schematics          11.2.19 (cli-only)
@angular/animations                 <error>
@angular/cdk                        <error>
@angular/cli                        11.2.19 (cli-only)
@angular/common                     <error>
@angular/compiler                   <error>
@angular/compiler-cli               <error>
@angular/flex-layout                <error>
@angular/forms                      <error>
@angular/material                   <error>
@angular/platform-browser           <error>
@angular/platform-browser-dynamic   <error>
@angular/router                     <error>
@schematics/angular                 11.2.19 (cli-only)
@schematics/update                  0.1102.19 (cli-only)
rxjs                                6.6.3 (cli-only)
typescript                          4.1.6 (cli-only)
webpack                             4.46.0 (cli-only)

After deleting the @angular folders in C:\Users\userid\AppData\Roaming\npm\node_modules and re-installing I still got the Angular: , so I installed the core again and I still get the above.. :(

1 Answer 1

0

Could you install @angular/core at the root level also? might fix it!

npm install -g @angular/[email protected]

else go the below path and delete all @angular/* related dependencies and install again

C:\Users\username\AppData\Roaming\npm
Sign up to request clarification or add additional context in comments.

2 Comments

This is what it showed after installing @angular/[email protected] (there isn't a core for 11.2.19). It shows that it's cli only and more packages came w/ an error
I edited the main post to show what the outcome was

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.