0% found this document useful (0 votes)
6 views

how to uninstall_upgrade angular cli_ - stack overflow

The document provides guidance on how to uninstall or upgrade Angular CLI, detailing various methods and commands to achieve this. It includes troubleshooting tips for common errors encountered during the process, such as issues related to file paths and dependencies. Additionally, it offers insights into managing npm cache and environment variables to ensure a successful installation or uninstallation.

Uploaded by

Adrian Arias
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

how to uninstall_upgrade angular cli_ - stack overflow

The document provides guidance on how to uninstall or upgrade Angular CLI, detailing various methods and commands to achieve this. It includes troubleshooting tips for common errors encountered during the process, such as issues related to file paths and dependencies. Additionally, it offers insights into managing npm cache and environment variables to ensure a successful installation or uninstallation.

Uploaded by

Adrian Arias
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Skip to main content Teams

Collectives™ on About Products OverflowAIStack Overflow for Teams Log inSign up


Stack Home
Overflow Search…
Where developers & technologists share private knowledge Ask Question
Get early access and see How to uninstall/upgrade Angular CLI?
Q&A for of
previews work
new features. with coworkers
Questions
Find centralized, trusted Advertising & Talent
Asked 8 years, 1 month agoModified 7 months agoViewed 927k times
content
Connect
Learnand
andcollaborate
more share
about Labs Reach devs & technologists worldwide about yourThe product,
Overflow Blog
knowledge Tags a single
around the technologies
within service or employer brand No code, only natural language: Q&A on
you use most.
location that is structured
This question shows research effort; it is useful and clear 179 OverflowAI prompt engineering with Professor
Users
and easy to search. GenAI features for Teams Greg...
Learn more about OverflowAPI One of the world’s biggest web scrapers
Learn more Companies
Collectives
about Teams Train & fine-tune LLMs has some thoughts on data ownership
LABS Labs Featured on Meta
Save this question. The future of collective knowledge sharing Upcoming initiatives on Stack Overflow
Jobs When activity
Show I try to create
on thisapost.
new project with Angular CLI, with: About the company and across the Stack Exchange
Visit the blog network...
Discussions ng n app More network sites to see advertising
COLLECTIVES test
Communities for I get this error: Call for testers for an early access
your favorite release of a Stack Overflow extension...
technologies.
Explore all fs.js:640 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^ TypeError: path must be 14 people chatting
Collectives a string or Buffer at TypeError (native)
Linked
TEAMS
How can I upgrade or uninstall Angular CLI?
angularangular-cli 100 How to upgrade Angular CLI to the latest
version

ShareImprove this questionFollow edited Nov 3, 2019 at 9:37 asked Sep 19, 2016 at 5:59 196 Errors: Data path ".builders['app-shell']"
Now available on Follow this question to receive notifications
Share a link to this question should have required property 'class'
Stack Overflow for veben RohanArihant
Teams! AI features 22.1k 15 1568gold
6883
badges
silver
83 bronze
badges2,730
badges 4 4 20
gold20badges
30
silver
30 bronze
badgesbadges
Copy link CC BY-SA 4.0 51 Cannot uninstall angular-cli
where you work:
search, IDE, and 11 Use npm uninstall -g angular-cli – ranakrunal9 Commented
Sep 19, 2016 at 6:01
chat. 17 Angular - TypeError: Cannot read
14 Now, use npm uninstall -g @angular/cli (stackoverflow.com/questions/43070441/…) – Jeremy Moritz Commented
Oct 17, property 'write' of undefined
Learn more
Explore Teams 2017 at 21:54
1 Could not find API compiler-cli, function
__NGTOOLS_PRIVATE_API_2

1 Angular: error, not installed as it should


20 Answers
Sorted by: Highest score (default)
-1 Uninstall Angular and typescript without
npm
This answer is useful 468
1 npm failed to install angular cli, or looks
like so

Save this answer. 1 I cant remove my global angular-cli


version(1.0.0-beta.28.3) whatsoever on
my windows machine
Using following
Show activity oncommands
this post. to uninstall :
0 How to remove global npm packge?
npm uninstall -g @angular/cli
npm cache clean --force See more linked questions

To verify: ng --version /* You will get the error message, then u have uninstalled */ Related
Using following commands to re-install : I want to uninstall an angular-cli
1
npm install -g @angular/cli
100 How to upgrade Angular CLI to the latest
version
Notes : - Using --force for clean all the caches - On Windows run this using administrator - On Mac use sudo ( $ How to degrade angular cli version?
sudo <command> ) 1

If you are using npm>5 you may need to use cache verify instead. ( $ npm cache verify ) 83 How to downgrade Angular CLI version?
ShareImprove this answerFollow edited Sep 9, 2019 at 3:24 answered Sep 21, 2016 at
Follow this answer to receive notifications
Share a link to this answer 9:15 6 Can't uninstall Angular CLI version
Aathil Ahamed
474 4 4 16silver bronze badges Santosh Pillai
16badges
Copy link CC BY-SA 4.0 8,593 1 1 32 gold32badge
28
silver
28 bronze
badgesbadges
0 Cannot uninstall angular-cli checks for
updates instead of uninstalling
16 Please note that Angular CLI has moved to @angular/cli: [sudo] npm install -g @angular/cli – Osmund Francis
Apr 4, 2017 at 15:17
Commented 0 Unable to uninstall angular/cli

5 npm cache clean is superseded by npm cache verfy so it seems – Arnd Brugman Commented
Jul 10, 2017 at 9:16 Can't Uninstall Angular CLI in Ubuntu - It
2
says `up to date in 0.083s`
3 npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is
guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. 1 Unable to uninstall CLI from Mac
– NoamG Commented
Dec 19, 2017 at 11:24
0 Not able Uninstall/Update Angular Cli in
1 how to uninstall latest version angular cli and install angular cli 1.6.1 – Ayyappa amara Commented
Jan 21, 2018 at 13:28 MAC
3 @NaomG npm version > 5 doesn't need you to clean cache.. but still if you need it run npm cache clean --
Hot Network Questions
force – Ashish Yadav Commented
Mar 29, 2018 at 7:04
Why aren't the air vents getting rid of air in
Show 9 more comments the underfloor heating system?

This answer is useful 45


Utopia as a drug dream

Why can't we see individual air molecules in


Save this answer. the sky?
None of
Show activity
the above
on this
solutions
post. alone worked for me. On Windows 7 this worked:

Install Rapid Environment Editor and remove any entries for node, npm, angular-cli or @angular/cli A remote trading bot that runs on the CLI -
first C++ project
Uninstall node.js and reinstall. Run Rapid Environment Editor again and make sure node.js and npm are in your System
or User path. Uninstall any existing ng versions with:
Extracting the interpolating solution function
npm uninstall -g angular-cli from NDSolve
npm uninstall -g @angular/cli
A novel where humans have to fight against
npm cache clean
huge spider-like aliens, and only veterans
can vote
Delete the C:\Users\YOU\AppData\Roaming\npm\node_modules\@angular folder.

Reboot, then, finally, run:


Which Church tradition (or denomination)
npm install -g @angular/cli can actually demonstrate unbroken
Apostolic succession?
Then hold your breath and run ng -v. If you're lucky, you'll get some love. Hold your breath henceforward every time you
run the ng command, because 'command not found' has magically reappeared for me several times after ng was running How to send a document using two
fine and I thought the problem was solved.
ShareImprove this answerFollow confused couriers?
edited Oct 10, 2018 at 8:03 answered Jul 22, 2017 at
Share a link to this answerFollow this answer to receive notifications 10:50
M.A.K. Ripon
2,138 3 3 30gold30badges
48
silver
48 bronze VanAlbert
badgesbadges Which of the FLS, SLS and GLS approach
Copy link CC BY-SA 4.0 2,449 1 1 22gold22badge
19
silver
19 bronze
badgesbadges
types are precision and which are non-
precision?
even simpler: stackoverflow.com/questions/43070441/… – Jeremy Moritz Commented
Oct 17, 2017 at 21:53

Does the duty to rescue in German Law


(StGB §323c) only apply for accidents, or
This answer is useful 39 also for deliberate acts?

Different numbers in all cells of a 3x3 board


v2
Save this answer.
Run the
Show activity
following
on this
commands
post. to get the very latest of angular
Why doesn't Hezbollah have an air force?
npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/cli@latest How can enchantments work to create
ng version
ShareImprove this answerFollow computers?
edited Jan 25, 2022 at 3:21 answered Jan 15, 2018 at
Follow this answer to receive notifications
Share a link to this answer 8:31
Stanley Mohlala What does the Rules Aren't Physics quote
Copy link CC BY-SA 4.0 7,501 1 1 13 gold13badge
22
silver
22 bronze
badgesbadges
mean?
The right answer, i only suggest add if you have a nvm, first nvm deactivate , this command only apply in the
current shell, i have problem when try execute the uninstall the console response 'up to date in 4.2 sec' Working principle of transimpedance
– Alberto Vazquez Commented
Jul 14 at 23:00 amplifier

Are UIs of video games subject to IP


protection?
This answer is useful 13
Can the Bundestag (German federal diet)
initiate new elections?
Save this answer.
Show activity on this post.
Regular solution, that does not work always: Does my university get billed every time I
access a paper?
npm uninstall -g @angular/cli
npm cache verify Quotation marks in dialogue for speech
npm install -g @angular/cli spoken by myself

Other more drastic solution: Which European country first introduced


wristwatches to China and why is it called
Uninstall Angular CLI globally 手表?

npm uninstall -g @angular/cli


How Can I Develop Memory, Visualization,
Uninstall Node.js & npm with uninstaller and Calculation Skills in Chess Without Paid
Courses?
Remove every environment variables related to Node.js & npm
Delete folders C:\Users\<user>\AppData\Roaming\npm and C:\Users\<user>\AppData\Roaming\npm-cache
Robust error handling mechanism in C++
Verify these commands are ko:
(safer than std::expected)
ng version
npm -v
Three-player rock-paper-scissors... but with
node -v
Wuxings!
Install Node.js & npm with installer: https://nodejs.org/en/download/
Install Angular CLI Using T1 Libertinus Fonts with pdfLaTeX:
Missing Symbols Issue
npm install -g @angular/cli

Finally, check your global Angular CLI version: Question feed


ng version
ShareImprove this answerFollow edited Apr 29, 2020 at 7:42 answered Nov 3, 2019 at 9:40
Follow this answer to receive notifications
Share a link to this answer
veben
22.1k 15 1568gold
6883badges
silver
83 bronze
badgesbadges
Copy link CC BY-SA 4.0

This answer is useful 10

Save this answer.


Ran into
Show activity
this recently
on this post.
myself on mac, had to remove the ng folder from /usr/local/bin . Was so long ago that I installed the
Angular CLI, I'm not entirely sure how I installed it originally.
ShareImprove this answerFollow answered Jul 18, 2019 at 1:58
Share a link to this answer Follow this answer to receive notifications
jassok
421 3 3 12silver
12badges
bronze badges
Copy link CC BY-SA 4.0

This answer is useful 8

Save this answer.


removeactivity
Show globalon
reference
this post.

npm uninstall -g angular-cli


npm cache clean
ShareImprove this answerFollow answered Sep 19, 2016 at
Share a link to this answerFollow this answer to receive notifications 6:05
A.T.
Copy link CC BY-SA 3.0 26.2k 8 8 49gold49badges
67
silver
67 bronze
badgesbadges

but error is same. Do anyone have any solution for that fs.js:640 return
binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^ TypeError: path must be a string or
Buffer at TypeError (native) at Object.fs.openSync (fs.js:640:18) at Object.fs.readFileSync (fs.js:508:33)
– RohanArihant Commented
Sep 19, 2016 at 6:28

This is very generic error it could be anything, missing dependency or wrong configuration. Better to ask this on
github.com/angular/angular.js/issues . BTW above is the way to uninstall angular. – A.T. Commented
Sep 19, 2016 at 6:50

add '--force' to the end without the single quotes. – Dale Commented
Jun 29, 2018 at 22:59

This answer is useful 7

Save this answer.


If nothing
Show activity
workson for,
thisyou
post.can also check your globally installed node modules like so:

cd /usr/local/lib/node_modules/npm/node_modules

Then remove the @angular folder:

rm -R @angular

And reinstall the angular-cli by running:

npm install -g @angular/cli


ShareImprove this answerFollow answered Sep 19, 2021 at
Share a link to this answerFollow this answer to receive notifications 15:06
timoblume
Copy link CC BY-SA 4.0 146 1 1 5silver
5 bronze
badgebadges
1 For me, I found @angular folder at /usr/local/lib/node_modules/ – King Commented
Jun 5, 2022 at 19:25

This answer is useful 5

Save this answer.


Angular
Show activity
cli hason
moved
this post.
to @angular/cli , so as from the github readme,

sudo npm uninstall -g @angular/cli


npm cache clean
ShareImprove this answerFollow answered Apr 22, 2017 at
Follow this answer to receive notifications
Share a link to this answer 9:22
All Іѕ Vаиітy
Copy link CC BY-SA 3.0 26.2k 16 1695gold
95113
badges
silver
113badges
bronze badges

This answer is useful 5

Save this answer.


I tried activity
Show all the above
on this
things,
post. and still ng as sticking around globally. So in powershell I ran Get-Command ng , and then it
became clear what my problem was. I was using yarn heavily in the past, and all the old angular cli packages were also
installed globally in the yarn cache location. I deleted my yarn cache for good measure, but probably could have just
updated the global angular cli via yarn. In any case, I hope this helps remind some of you that if you use yarn, then global
commands like ng can also live in another path than where npm puts them.
ShareImprove this answerFollow answered Aug 11, 2019 at
Share a link to this answer Follow this answer to receive notifications 14:34
Rafe
Copy link CC BY-SA 4.0 9,175 9 9 53
gold53badges
69
silver
69 bronze
badgesbadges

This answer is useful 3


Save this answer.
Well inline
Show activity
with
onmany
this post.
answers above even I had the issue where I wasn't able to create a new-app with angular cli 9.1.0
on Mac OS 10.15.3 . My issue was resolved by uninstalling the angular cli, cleaning the cache and re-installing the
angular cli.

npm uninstall -g @angular/cli

Verify installation status with ng --version

npm cache verify


npm install -g @angular/cli

Try creating new app with ng new my-app now to see if the above helps.
ShareImprove this answerFollow answered Apr 9, 2020 at 5:12
Follow this answer to receive notifications
Share a link to this answer
Gururaj Birajdar
41 3 3 bronze badges
Copy link CC BY-SA 4.0

This answer is useful 2

Save this answer.


Show activity
Installed withon this post.
yarn

If you added the angular cli with yarn, you can only remove (and therefor update) it the same way. See the short but great
answer here: https://stackoverflow.com/a/56192531/13226740

This helped me a lot after one hour of desperate search, because I forgot, that I installed the CLI via yarn.
ShareImprove this answerFollow answered May 21, 2021 at
Share a link to this answerFollow this answer to receive notifications 9:48
Tino
Copy link CC BY-SA 4.0 666 2 2 10 gold10badges
16
silver
16 bronze
badgesbadges

This answer is useful 1

Save this answer.


I always
Show activity
use the
onfollowing
this post. commands before upgrading to latest . If it is for Ubuntu prefix : 'sudo'

npm uninstall -g angular-cli


npm cache clean
npm install -g angular-cli@latest
ShareImprove this answerFollow answered May 24, 2017 at
Share a link to this answerFollow this answer to receive notifications 15:56
Yashwanth Kata
Copy link CC BY-SA 3.0 867 9 9 24
silver
24badges
bronze badges

This answer is useful 0

Save this answer.


use following
Show activitycommand
on this post.
if you installed in globally,

npm uninstall -g angular-cli


ShareImprove this answerFollow answered Sep 19, 2016 at
Follow this answer to receive notifications
Share a link to this answer 6:07
Ajith K P
Copy link CC BY-SA 3.0 398 3 3 12silver
12badges
bronze badges

This answer is useful 0

Save this answer.


Not theactivity
Show answeronfor
this
your
post.
question, but the answer to the problem you mentioned:

It looks like you have wrong configuragion file for the angular-cli version you are using.

In angular-cli.json file, try to change the following:

from:

"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}

to:

"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
ShareImprove this answerFollow answered Feb 23, 2017 at
Follow this answer to receive notifications
Share a link to this answer 19:41
Gal Tamir
Copy link CC BY-SA 3.0 87 6 6 bronze badges

This answer is useful 0

Save this answer.


Show
$ npmactivity
uninstall
on-gthis
angular-cli
post.
$ npm cache clean
$ npm install -g angular-cli
ShareImprove this answerFollow edited Aug 26, 2019 at 10:43 answered May 15, 2017 at
Share a link to this answer Follow this answer to receive notifications 16:50
Lekens
Copy link CC BY-SA 3.0 1,961 18 1833silver
33 bronze
badgesbadges

This answer is useful 0

Save this answer.


Run this
Show activity
command
on this post.

npm uninstall angular-cli


ShareImprove this answerFollow edited Jan 10, 2020 at 10:25 answered Oct 6, 2016 at 1:58
Follow this answer to receive notifications
Share a link to this answer
RavinderSingh13 Julian Bici
133k 14 1459gold5997
badges
silver
97 bronze
badgesbadges
23 6 6 bronze badges
Copy link CC BY-SA 4.0

This answer is useful 0

Save this answer.


I got similar
Show activityissue
on this
while
post.
I was creating a new angular app. The problem for me was due to npm 7 and I just downgraded
npm.

npm install -g npm@6

If we need to uninstall or upgrade cli, we can use these commands

npm uninstall -g @angular/cli


npm cache clean --force
then reinstall using the command

npm install -g @angular/cli


ShareImprove this answerFollow answered May 21, 2021 at
Share a link to this answerFollow this answer to receive notifications 10:22
Rohith V
Copy link CC BY-SA 4.0 1,125 1 1 12
gold12badge
26
silver
26 bronze
badgesbadges

This answer is useful 0

Save this answer.


For theactivity
Show error I on
wasthis
facing:
post.

ERR! code ENOTEMPTY npm ERR! syscall rename npm ERR! path /usr/local/lib/node_modules/@angular/cli npm
ERR! dest /usr/local/lib/node_modules/@angular/.cli-G39XYeT9 npm ERR! errno -66 npm ERR! ENOTEMPTY:
directory not empty, rename '/usr/local/lib/node_modules/@angular/cli' ->
'/usr/local/lib/node_modules/@angular/.cli-G39XYeT9'

I used the following steps and it worked:

#### uninstalling globally installed libs


sudo npm uninstall -g @angular/cli
#### uninstall other libs
sudo npm uninstall -g

#### uninstalling node


sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}
rm -rf /Users/[homedir]/.npm
#### reinstall node
https://nodejs.org/en/download/
#### update npm to latest
sudo npm install -g npm
#### reinstall angular-cli
sudo npm install -g @angular/cli
ShareImprove this answerFollow answered Aug 13, 2021 at
Share a link to this answerFollow this answer to receive notifications 6:41
ASANIAN
Copy link CC BY-SA 4.0 400 2 2 9silver
9 bronze
badges
badges

This answer is useful 0

Save this answer.


Im myactivity
Show case, after
on this
trying
post.
everything: I was using a proxy internet connection. I was using my cell phone to repeat the
signal. Believe or not, this was the problem, after I have tried essentiallly all solutions online. Found somewhere something
about proxy, and remember I am using proxy. Just to maybe save the life of somebody else, it is money!
ShareImprove this answerFollow answered Dec 1, 2022 at
Share a link to this answer Follow this answer to receive notifications 20:17
Jorge Guerra Pires
Copy link CC BY-SA 4.0 622 11 1125 silver
25 bronze
badgesbadges

This answer is useful -2

Save this answer.


Simplest
Show activity
workaround
on this post.
to continue working in your project is comment line 25 of node_modules/angular-cli/bin/ng:

// Version.assertPostWebpackVersion();

Until it is fixed properly.


ShareImprove this answerFollow edited Oct 6, 2016 at 1:41 answered Oct 4, 2016 at 6:37
Share a link to this answer Follow this answer to receive notifications
Emile Bergeron Vadym
17.4k 5 5 84gold84badges
130
silver
130badges
bronze9 badges
Copy link CC BY-SA 3.0
1 using npm uninstall -g angular-clI is the better option. – Praveen Rana Commented
Apr 18, 2017 at 10:41

Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question. The
reputation requirement helps protect this question from spam and non-answer activity.

Not the answer you're looking for? Browse other questions tagged angularangular-cli or ask your own question.
By clicking “Accept all cookies”, you agree Stack Exchange can store
cookies on your device and disclose information in accordance with our Cookie
Policy. STACK OVERFLOW PRODUCTS COMPANY STACK EXCHANGE NETWORK BlogFacebookTwitterLinkedInInstagram
Questions Teams About Technology
Help Advertising Press Culture & recreation
Accept all cookies Necessary
Chatcookies only Talent Work Here Life & arts
Legal Science
Customize settings
Privacy Policy Professional
Terms of Service Business Site design / logo © 2024 Stack Exchange Inc;
Contact Us API user contributions licensed under CC BY-SA .
Cookie Settings Data rev 2024.11.8.18238
Cookie Policy

You might also like