Upgrading to the latest Angular CLI

As of the Angular CLI beta 30, the command to install Angular CLI looks as follows:

npm install -g @angular/cli

To get rid of the old version of Angular CLI and install the new one, run the following commands:

npm uninstall -g angular-cli
npm cache clean
npm install -g @angular/cli

To update the existing CLI projects, modify the CLI dev dependency in package.json to this:

"@angular/cli": "1.0.0-beta.32"

Then update the CLI version on top of the angular-cli.json, remove your node_modules dir and run npm install.

Advertisements

7 thoughts on “Upgrading to the latest Angular CLI

  1. Good morning Yakov! I have task to create video chat which will allow to communicate two people witch each other. My architecture of application is: front-end angular 2/typescript, backend: java, spring boot (and submodules). Everything works fine but I’ve got problem with understanding how to make video streaming. I was looking for any framework to do it but I’ve failed. As I understand WebSocket doesn’t help me in this task and it’s no appropriate to use it. Also as I understand Spring doesn’t have any tool to solve the task. Is it really that I have to create streaming via clean UDP which exists in java or maybe there is another way, any framework which gives more higher interfaces for the task?

  2. Tried to upgrade Angular-cli on 2 Win 10 PCs, failed on both. I mean, it installed without errors, but when I tried to run it, got: The “@angular/compiler-cli” package was not properly installed.
    Error: The “@angular/compiler-cli” package was not properly installed.
    at Object. (C:\Users\oleg\AppData\Roaming\npm\node_modules\angular-cli\node_modules\@ngtools\webpack\src\index.js:14:11)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object. (C:\Users\oleg\AppData\Roaming\npm\node_modules\angular-cli\models\webpack-configs\typescript.js:3:17)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object. (C:\Users\oleg\AppData\Roaming\npm\node_modules\angular-cli\models\webpack-configs\index.js:9:10)

    On another ng version or ng help gives “Enexpected token”. Any idea how to fix it?

  3. Don’t upgrade Angular CLI. Remove it and reinstall.
    ng uninstall @angular/cli -g
    ng cache clean
    ng install @angular/cli -g

    After that. generate new project:
    ng new hello-cli

    Finally, copy your existing app code (your app dir, styles, and resources) into this new project.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s