Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
705 views
in Technique[技术] by (71.8m points)

npm - Problems updating bower to the latest version

I am using bower

$ bower -v
0.9.2

latest version of bower is 1.x.x https://github.com/bower/bower/releases

I run to update bower to the latest version

npm update -g bower 

this does not help

I still have

$ bower -v
0.9.2
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

1) you have to clear npm cache and then update bower

sudo npm cache clean
npm update -g bower

2) If 1st solution does not help

try to remove and install it again

npm -g uninstall bower
npm -g install bower

check if it is still here

which bower

if it will show you something like

/usr/local/bin/bower

then

rm <path from previous command>

and after install it again

npm -g install bower

open new bash window and enjoy latest version of bower

same will help with other packages


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...