Angular-cli: ng error

Created on 28 Dec 2016  路  11Comments  路  Source: angular/angular-cli

Please provide us with the following information:

OS?

Linux (Ubuntu 16.04 - 64bits)

Versions.

ng -v
Mg++ version:
Mg++ 1.5beta1 (formerly MicroGnuEmacs Adv.)
node --version
v4.2.6

Repro steps.

ng new my_project

The log given by the failure.

It's opening a mg editor

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

Most helpful comment

whenever i type ng -v then it display Mg++ 1.5beta1 (formerly MicroGnuEmacs Adv.)
i want to create new project with the help of ng command but is dosent work..
help me...
in my system npm -v4.2.0 anf node -v7.10.0 is available
but i cant work with angular-cli..what i need to do???

All 11 comments

Hey @perylemke, It looks like you have the ng-common package installed on your system, which also provides the ng executable:

http://packages.ubuntu.com/xenial/all/ng-common/filelist

It appears to be the Nihongo Micro Gnu Emacs editor. If you don't use it, or don't know it, it's probably safe to uninstall it.

Not CLI related.

as @beeman told...

If you are not using ng-common then remove it using sudo apt remove ng-common

then remove node cache

and give a path to in .bashrc or .profile

alias='path/to/node_modules/angular-cli/bin/ng'

boom its working...!!

whenever i type ng -v then it display Mg++ 1.5beta1 (formerly MicroGnuEmacs Adv.)
i want to create new project with the help of ng command but is dosent work..
help me...
in my system npm -v4.2.0 anf node -v7.10.0 is available
but i cant work with angular-cli..what i need to do???

@kruvimak please read the comment of @sidjoshi001 he provided a solution for this problem - and it is working for me having the same issue. Also I think this should be added to the Wiki if possible, google this error is not easily linking to this issue.

If you are not using ng-common then remove it using sudo apt remove ng-common
then remove node cache
and give a path to in .bashrc or .profile: alias='path/to/node_modules/angular-cli/bin/ng'

.bashrc or .profile can be found using this command: ls -la ~/ | more
If not, you can just create it within the users home directory: sudo nano ~/.bashrc giving it the following permission sudo chmod 644 .bashrc (rel. https://askubuntu.com/questions/127056/where-is-bashrc)

Does this work for you @kruvimak ?

@chriszo111 i have tried your method but it is not working.. kindly tell me is there any other solution

I am not able to install angular cli on my ubuntu.

ERROR:

sudo npm install -g @angular/cli
npm ERR! addLocal Could not install angular/cli
npm ERR! Error: ENOENT, stat 'angular/cli'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com

npm ERR! System Linux 4.4.0-98-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "@angular/cli"
npm ERR! cwd /home/asm
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path angular/cli
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/asm/npm-debug.log
npm ERR! not ok code 0


Please help me out.

@perylemke I also face the same issue. Un-install ng-common.

Tive o mesmo problema, meu sistema Ubuntu 18.04.1 LTS.
Solucionei com os seguintes passos:

sudo apt remove ng-common
sudo npm uninstall -g @angular/cli
sudo rm /usr/local/bin/ng
sudo npm install -g @angular/cli

Note que no 3潞 passo tive remover o link simb贸lico (ng -> ../lib/node_modules/angular-cli/bin/ng) porque se n茫o vai ocorrer um error na instala莽茫o do Angular.

Tive o mesmo problema, meu sistema Ubuntu 18.04.1 LTS.
Solucionei com os seguintes passos:

sudo apt remove ng-common
sudo npm uninstall -g @angular/cli
sudo rm /usr/local/bin/ng
sudo npm install -g @angular/cli

Note que no 3潞 passo tive remover o link simb贸lico (ng -> ../lib/node_modules/angular-cli/bin/ng) porque se n茫o vai ocorrer um error na instala莽茫o do Angular.

Thanks,Now working

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

gotschmarcel picture gotschmarcel  路  3Comments

rwillmer picture rwillmer  路  3Comments

hartjo picture hartjo  路  3Comments

daBishMan picture daBishMan  路  3Comments

MateenKadwaikar picture MateenKadwaikar  路  3Comments