NativeScript / NativeScript/nativescript-cli

Unable to Update CLI

Abierto
#5,045 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

docs
Lenguaje dominante
JavaScript
Estrellas
1.1k
Forks
204
Merge medio
1 d 9 h
PR fusionados (30 d)
8

Descripción

Environment

  • CLI: 5.1.0
  • OS: macOS Mojave version 10.14.4

Describe the bug
I am attempting to update the CLI to 6.1.2 however am having some issues during the upgrade process. I follow the upgrade instructions in the documentation by running 'npm install -g nativescript' which then prints out the following:

> nativescript@5.1.1 preuninstall /Users/myuser/.npm-global/lib/node_modules/nativescript
> node preuninstall.js

/Users/myuser/.npm-global/bin/nativescript -> /Users/myuser/.npm-global/lib/node_modules/nativescript/bin/tns
/Users/myuser/.npm-global/bin/tns -> /Users/myuser/.npm-global/lib/node_modules/nativescript/bin/tns

> fsevents@1.2.9 install /Users/myuser/.npm-global/lib/node_modules/nativescript/node_modules/fsevents
> node install

node-pre-gyp WARN Using request for node-pre-gyp https download 
[fsevents] Success: "/Users/myuser/.npm-global/lib/node_modules/nativescript/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" is installed via remote

> nativescript@6.1.2 postinstall /Users/myuser/.npm-global/lib/node_modules/nativescript
> node postinstall.js

Autocompletion is already enabled

You have successfully installed the NativeScript CLI!

Your next step is to create a new project:
tns create

New to NativeScript? Try the tutorials in NativeScript Playground: https://play.nativescript.org


If you have any questions, check Stack Overflow: https://stackoverflow.com/questions/tagged/nativescript and our public Slack channel: https://nativescriptcommunity.slack.com/

+ nativescript@6.1.2
added 124 packages from 115 contributors, removed 51 packages and updated 178 packages in 11.277s

However when checking the version using 'tns --version' it still shows 5.1.0.

I have attempted to completely uninstall the CLI and to confirm I check that it is completely uninstalled by attempting to run a tns command, as well as checking 'which tns' - both of which seems to show it is completely deleted. However, reinstalling nativescript always leads it back to 5.1.0.

Running the command 'which tns' results in the following path:

/usr/local/bin/tns

At this point I am stuck as to what to do to fix this, however my belief is that the issue lies in the path above not being equal to the path showed during the install process of /.npm-global/lib/node_modules/nativescript. Any help would be greatly appreciated.

Thank you!

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza comparando el ejecutable indicado por which tns con la ruta de instalación bajo .npm-global/lib/node_modules/nativescript, y después ejecuta tns --version tras el comando documentado npm install -g nativescript. Se considera completado cuando el ejecutable tns activo indica la versión 6.1.2 en lugar de 5.1.0; el issue no menciona ningún archivo fuente ni ninguna prueba.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript, node.js
Área
cli
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.