Cómo desinstalar Angular CLI?


He instalado Angular-CLI, pero está mostrando un error. Cuando creo un nuevo proyecto con ng app, obtengo este error:

fs.js:640
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

TypeError: path must be a string or Buffer
    at TypeError (native)

Así que quiero desinstalar Angular-CLI.

Author: BBaysinger, 2016-09-19

10 answers

Usando el siguiente comando:

[sudo] npm uninstall -g @angular/cli
npm cache clean
[sudo] npm install -g @angular/cli

Nota: {[6] } En Windows ejecute esto usando administrador y en Mac use sudo

 119
Author: Santosh Pillai,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-03-28 20:49:08

Ninguna de las soluciones anteriores por sí sola funcionó para mí. En Windows 7 esto funcionó:

Instale Rapid Environment Editor y elimine cualquier entrada para node, npm, angular-cli o @angular/cli

Nodo de desinstalación.js y reinstalar. Ejecute Rapid Environment Editor de nuevo y asegúrese de que node.js y npm están en su Sistema o ruta de usuario. Desinstalar cualquier versión ng existente con:

Npm uninstall-g angular-cli

Npm uninstall-g @angular/cli

Caché Npm clean

Suprímase el C:\Users\YOU\AppData\Roaming\npm\node_modules\@angular carpeta.

Reinicie, luego, finalmente, ejecute:

Npm install-g @ angular / cli

Entonces aguanta la respiración y corre ng-v. Si tienes suerte, obtendrás algo de amor. Contenga la respiración de ahora en adelante cada vez que ejecute el comando ng, porque 'comando no encontrado' ha reaparecido mágicamente para mí varias veces después de ng estaba funcionando bien y pensé que el problema estaba resuelto.

 14
Author: VanAlbert,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-07-22 10:50:06

Eliminar referencia global

npm uninstall -g angular-cli
npm cache clean
 6
Author: A.T.,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-09-19 06:05:41

Ejecute los siguientes comandos para obtener lo último de angular

npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/cli@latest
npm install
 6
Author: Stanley,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-01-15 08:31:38

Angular cli se ha movido a @angular/cli, por lo que desde el readme github,

sudo npm uninstall -g @angular/cli
npm cache clean
 4
Author: All Іѕ Vаиітy,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-04-22 09:22:13

Use el siguiente comando si instaló globalmente,

 npm uninstall -g angular-cli
 0
Author: Ajith K P,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-09-19 06:07:21

Ejecute este comando npm uninstall angular-cli

 0
Author: Julian Bici,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-10-06 01:58:34

No la respuesta a tu pregunta, sino la respuesta al problema que mencionaste:

Parece que tiene un archivo de configuración incorrecto para la versión de angular-cli que está utilizando.

En angular-cli.archivo json, intente cambiar lo siguiente:

De:

  "environmentSource": "environments/environment.ts",
  "environments": {
    "dev": "environments/environment.ts",
    "prod": "environments/environment.prod.ts"
  }

A:

  "environments": {
    "source": "environments/environment.ts",
    "dev": "environments/environment.ts",
    "prod": "environments/environment.prod.ts"
  }
 0
Author: Gal Tamir,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-02-23 19:41:13
 $ npm uninstall -g angular-cli 
 $ npm cache clean 
 $ npm install -g angular-cli
 0
Author: Lekens,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-15 16:50:09

La solución más simple para continuar trabajando en su proyecto es comment line 25 of node_modules/angular-cli/bin / ng :

// Version.assertPostWebpackVersion();

Hasta que se arregle correctamente.

 -1
Author: Vadym,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-10-06 01:41:07