Closed bradrice closed 5 years ago
@bradrice I think your issue is related to using NVM (the node manager). Having NativeScript 5.4.2 (without using NVM) and the latest Sidekick is working as expected on my Mac.
On my side the command which tns
is outputting
usr/local/bin/tns
This is a nvm issue. I uninstalled v12.4.0 and Sidekick started working again. Perhaps it would be prudent to allow an end user to specify a node version inside of Sidekick instead of have it pick the highest installed version?
@bradrice the CLI is getting the Node set in the global environment. I guess, in your case, the NVM is changing the global variable to the actively used version.
Please, provide the details below:
Did you verify whether this issue has already been reported here?
Yes
Tell us about the problem
If I type which tns: /Users/brice/.nvm/versions/node/v10.13.0/bin/tns
from the command line if I type tns --version I get: 5.4.2
When I launch Nativescript Sidekick I get a message saying it cannot find my cli and wants me to install the latest. If I try it says failed. I can't get past the screen.
Which platform(s) does the issue occur on?
Mac OS
Provide the following version numbers that the issue occurs with:
Version: 1.17.0-v.2019.5.31.1 (latest) 5.4.2 - but sidekick doesn't see it
Tell us how to recreate the issue in as much detail as possible
Does this issue happen every time?
Yes
Send the client logs
ENV: {"NVM_CD_FLAGS":"","ANDROID_HOME":"/Users/brice/Library/Android/sdk","SHELL":"/bin/bash","TMPDIR":"/var/folders/0h/xjv_gy2j0m1gdmc1tx_707480000gp/T/","Apple_PubSub_Socket_Render":"/private/tmp/com.apple.launchd.yw2ySj9uUi/Render","NVM_DIR":"/Users/brice/.nvm","USER":"brice","COMMAND_MODE":"unix2003","SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.BGuRQEDdig/Listeners","__CF_USER_TEXT_ENCODING":"0x1F6:0x0:0x0","PATH":"/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/brice/.nvm/versions/node/v12.4.0/bin:/usr/local/bin:/usr/local/share/android-sdk/tools//usr/local/Cellar/gradle/4.8:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:","SECRET_KEY":"some3333###","PWD":"/","JAVA_HOME":"/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home","LANG":"en_US.UTF-8","XPC_FLAGS":"0x0","PS1":"\u - \W $ ","XPC_SERVICE_NAME":"com.apple.xpc.launchd.oneshot.0x1000000a.NativeScript Sidekick","HOME":"/Users/brice","SHLVL":"2","LOGNAME":"brice","NVMBIN":"/Users/brice/.nvm/versions/node/v12.4.0/bin","":"/Users/brice/.nvm/versions/node/v12.4.0/bin/node"}
TIME: appReady: 102.069ms
TIME: syncProxy: 38.759ms
TIME: apiShell: 182.694ms
[2019-06-22T18:03:36.524Z]: Shell Ready - {"shellData":{"lastModuleEvent":"componentsReady","moduleEventsCache":68,"sendRequestsCache":343,"windows":[{"type":"splash-screen","ready":false},{"type":"index","ready":false}],"shellReady":false,"allWindowsReady":false}}
TIME: modulesLoad: 362.635ms
TIME: checkPrerequisites: 2451.839ms
[2019-06-22T18:03:38.322Z]: UI Receiving Ready - {"uiData":{"readyForReceiving":true,"readyForSending":false,"sendRequestsCache":7},"windowHref":"file:///Applications/NativeScript%20Sidekick.app/Contents/Resources/app.asar/ui/index.html","shellData":{"lastModuleEvent":"componentsReady","moduleEventsCache":68,"sendRequestsCache":358,"windows":[{"type":"splash-screen","ready":false},{"type":"index","ready":false}],"shellReady":false,"allWindowsReady":false}} [2019-06-22T18:03:38.323Z]: Shell Window Ready - {"windowType":"index","shellData":{"lastModuleEvent":"componentsReady","moduleEventsCache":68,"sendRequestsCache":358,"windows":[{"type":"splash-screen","ready":false},{"type":"index","ready":true}],"shellReady":false,"allWindowsReady":false}} [2019-06-22T18:03:38.341Z]: UI Receiving Ready - {"uiData":{"readyForReceiving":true,"readyForSending":false,"sendRequestsCache":7},"windowHref":"file:///Applications/NativeScript%20Sidekick.app/Contents/Resources/app.asar/ui/splash-screen.html","shellData":{"lastModuleEvent":"componentsReady","moduleEventsCache":68,"sendRequestsCache":358,"windows":[{"type":"splash-screen","ready":false},{"type":"index","ready":true}],"shellReady":false,"allWindowsReady":false}} [2019-06-22T18:03:38.341Z]: Shell Window Ready - {"windowType":"splash-screen","shellData":{"lastModuleEvent":"componentsReady","moduleEventsCache":68,"sendRequestsCache":358,"windows":[{"type":"splash-screen","ready":true},{"type":"index","ready":true}],"shellReady":true,"allWindowsReady":true}} [2019-06-22T18:03:38.752Z]: UI Sending Ready - {"uiData":{"readyForReceiving":true,"readyForSending":true,"sendRequestsCache":15},"windowHref":"file:///Applications/NativeScript%20Sidekick.app/Contents/Resources/app.asar/ui/splash-screen.html","shellData":{"lastModuleEvent":"componentsReady","moduleEventsCache":68,"sendRequestsCache":0,"windows":[{"type":"splash-screen","ready":true},{"type":"index","ready":true}],"shellReady":true,"allWindowsReady":true}} [2019-06-22T18:03:39.021Z]: UI Sending Ready - {"uiData":{"readyForReceiving":true,"readyForSending":true,"sendRequestsCache":89},"windowHref":"file:///Applications/NativeScript%20Sidekick.app/Contents/Resources/app.asar/ui/index.html","shellData":{"lastModuleEvent":"componentsReady","moduleEventsCache":68,"sendRequestsCache":0,"windows":[{"type":"splash-screen","ready":true},{"type":"index","ready":true}],"shellReady":true,"allWindowsReady":true}}
TIME: initWindows: 3625.021ms
I use nvm to set my node version prerequisites is looking in wrong npm version:
No folders with incorrect permissions. Node version detected: 12.4.0 NS CLI version detected: null NS CLI not found. Error: TNS doctor does not detect the version of NS CLI. Execute command which nativescript NS CLI found at location: /usr/local/bin/nativescript Execute command npm uninstall -g nativescript Successfully uninstalled NS CLI. Execute command which nativescript NS CLI found at location: /usr/local/bin/nativescript TNS doctor does not detect the version of NS CLI. No folders with incorrect permissions. Node version detected: 12.4.0 NS CLI version detected: null NS CLI not found. Error: TNS doctor does not detect the version of NS CLI. Execute command which nativescript NS CLI found at location: /usr/local/bin/nativescript Execute command npm uninstall -g nativescript Successfully uninstalled NS CLI. Execute command which nativescript NS CLI found at location: /usr/local/bin/nativescript TNS doctor does not detect the version of NS CLI.