Angular-cli: Not able to create new angular project after upgrade

Created on 15 Sep 2016  路  16Comments  路  Source: angular/angular-cli

  1. OS - ubuntu 14.04
  2. ng --version : not able to get version itself
  3. Repro steps - after install ng --version
    4.Logs:
    It seems like you're using a project generated using an old version of the Angular CLI.
    The latest CLI now uses webpack and includes a lot of improvements, include a simpler
    workflow, a faster build and smaller bundles.

To get more info, including a step-by-step guide to upgrade the CLI, follow this link:
https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.12

npm version : 3.10.3
node version : 6.5.0

Most helpful comment

I ran into this issue as well, but it was a result of a lingering npm link against an earlier version from master a long time ago.

After doing npm unlink angular-cli I was able to install the latest version.

All 16 comments

+1
Same behaviour with Mac Os El Captan.

Executed

npm uninstall -g angular-cli
npm cache clean

before all attempts.
Tried these 3 install commands and error is the same:

npm install -g angular-cli@webpack
npm install -g angular-cli@latest
npm install -g angular-cli

Also tried npm install --save-dev angular-cli@webpackand npm install -g angular-cli@latest after global install inside a project and the command also did not work.

Looks like duplicate of #2135

Same problem, OS: ubuntu 16.04, node: 6.5.0, npm : 3.10.3
I Solved the issue as follows:

  • cd /usr/local/lib/node_modules/angular-cli/
  • sudo npm install --save process-nextick-args
  • sudo npm install --save util-deprecate

I solved by running the cli upgrade steps:

Global package:

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

IMPORTANT: Local project package:

rm -rf node_modules dist tmp
npm install --save-dev angular-cli@latest
ng init

Update [workaround]: updating exiting angular-cli projects or as described above, creating a new directory and executing ng init is working fine.
Will use angular-cli with ng init while commands executed outside existing projects do not work.

Make sure you don't have a node_modules folder in your current directory that contains angular-cli, node will default to that one, and if it's outdated, you're going to get that error no matter how many times you reinstall node, I just found that out the hard way!

I could not reproduce this on beta.15 myself. If you still get this with the latest version, please let me know and I will reopen the issue.

Confirmed. Fixed on beta 15.

@filipesilva still i am facing the issue after upgrade
$ ng new myNewApp
result : Error

there is no logs

@santoshgistto -- what does ng --version say when you're not inside an existing node project?

@JanStureNielsen
ng --version

angular-cli: 1.0.0-beta.15
node: 6.6.0
os: linux x6

@santoshgistto -- so the original problem you reported in this issue is now gone, right? And this issue is closed. I suggest you open a question on StackOverflow for better support...

Does the ng init work-around sited above work for you?

mkdir foo && cd foo && ng init

FWIW, my OpenSUSE 13.2 configuration is working fine with Node 6.5:

jan@linux-zd16:~/src/fm-repos> ng --version
angular-cli: 1.0.0-beta.15
node: 6.5.0
os: linux x64

so you might try downgrading Node to 6.5 -- remember to reinstall Angular CLI after your downgrade.

I ran into this issue as well, but it was a result of a lingering npm link against an earlier version from master a long time ago.

After doing npm unlink angular-cli I was able to install the latest version.

Thanks @thelgevold. npm unlink angular-cli, uninstall, cache clear and reinstall did the trick for me.

This is still happening to me. I have tried all the suggestions in the comments and that didn't work. I have also tried completely uninstalling Node and NPM and reinstalling and that still didn't work.

CLI version: 1.0.0-beta.24
Node version: 6.10.3
NPM version: 3.10.10
OS: Win7

Upgrading to latest version is impossible at the moment because of other company dependencies.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rajjejosefsson picture rajjejosefsson  路  3Comments

delasteve picture delasteve  路  3Comments

naveedahmed1 picture naveedahmed1  路  3Comments

IngvarKofoed picture IngvarKofoed  路  3Comments

brtnshrdr picture brtnshrdr  路  3Comments