0

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?

3
  • 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
    – brando
    Oct 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 ... Oct 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
    – brando
    Oct 14, 2016 at 21:49

1 Answer 1

0

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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.