NativeScript / NativeScript/nativescript-cli

Unable to Update CLI

オープン
#5,045 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

docs
主要言語
JavaScript
スター
1.1k
フォーク
204
平均マージ
1日 9時間
マージ済み PR(30日)
8

説明

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!

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、which tns で報告された実行可能ファイルと .npm-global/lib/node_modules/nativescript 配下のインストールパスを比較し、次に、ドキュメントに記載された npm install -g nativescript コマンドの実行後に tns --version を実行します。アクティブな tns 実行可能ファイルが 5.1.0 ではなくバージョン 6.1.2 を報告すれば完了です。この issue ではソースファイルやテストは指定されていません。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, node.js
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。