I have a created a project using angular-cli beta 15, I would like to upgrade to angular-cli beta 17, would that cause me any problems?
-
The approach I have used in this circumstance is simply create a new ng project after having installed angular-cli@latest ("ng new project-name) then copy over anything from the app folder in the previous project with the exception of app.modules.ts which I reconfig manually– brandoOct 14, 2016 at 20:49
-
Thanks for your reply, I did that as well couple of times, and I know cli does give you the option with ng init after you install the new cli version, but curious if not doing eitehr will work or not ...– Jay BishtawiOct 14, 2016 at 21:00
-
My understanding is that future versions of angular-cli will have seamless upgrading, but up until now I was just doing full re-installs just to make sure to get all latest goodies– brandoOct 14, 2016 at 21:49
1 Answer
Yes you can. You have to uninstall cli globally first:
npm uninstall -g angular-cli
npm cache clean
npm install -g angular-cli@latest
Then remove the project files
rm -rf node_modules dist tmp
npm install --save-dev angular-cli@latest
ng init
ng init asks you questions to overwrite your current files. Press d to see the difference. Sometimes only installing angular-cli and trying to run ng init doesn't work. If that is the case you can do npm install than install the latest cli. If you have a smaller project, I would try switching that first. Good luck!