angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Not able to create new angular project after upgrade

Open santoshgistto opened this issue 10 years ago • 16 comments

  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

santoshgistto avatar Sep 15 '16 18:09 santoshgistto

+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.

loiane avatar Sep 15 '16 18:09 loiane

Looks like duplicate of #2135

andrevmatos avatar Sep 15 '16 19:09 andrevmatos

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

gengiscb avatar Sep 15 '16 21:09 gengiscb

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

albanx avatar Sep 18 '16 11:09 albanx

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.

loiane avatar Sep 18 '16 13:09 loiane

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!

mikedsharp avatar Sep 20 '16 20:09 mikedsharp

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.

filipesilva avatar Sep 21 '16 17:09 filipesilva

Confirmed. Fixed on beta 15.

loiane avatar Sep 21 '16 18:09 loiane

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

there is no logs

santoshgistto avatar Sep 22 '16 18:09 santoshgistto

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

JanStureNielsen avatar Sep 22 '16 20:09 JanStureNielsen

@JanStureNielsen ng --version

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

santoshgistto avatar Sep 23 '16 03:09 santoshgistto

@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.

JanStureNielsen avatar Sep 23 '16 16:09 JanStureNielsen

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.

thelgevold avatar Oct 05 '16 13:10 thelgevold

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

elvisfernandes avatar Oct 26 '16 18:10 elvisfernandes

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.

Larisho avatar May 17 '17 18:05 Larisho

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.