You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I solved it myself after completely uninstalling node/npm, reinstalled node 4.2.2 from node js site, reinstalled nativescript. Now all looks set for my first prototype app. Phew... for a first impression, this is hard.
Thanks for this feedback. We are currently in the process of strengthening our getting started experience and one of the major pain points we are going to address is Node.js installation issues. Starting with 1.5 version of NativeScript we will have a black list of version of Node that are incompatible with the CLI. If you had such an incompatible version we will stop you from executing any command in the CLI and guide you into installing a greener version.
@donaldking , this issue had been resolved a while ago. Are you using nvm?
Can you try installing nativescript-cli and send us the output npm i -g nativescript > out.txt
To make matter even worse, as soon as tns adds the .bashrc and .bash_profile file, both iTerm and terminal start to read these by default, and all of the configurations in .profile are not sourced.
I fixed this by manually coping the nativescript folder from my local node_modules folder to this location :-
/usr/local/Cellar/node@8/8.9.4/lib/node_modules/
then just added a path in .bash_profile file
I encountered this issue just now. The solution for me was to change my default shell from zsh to bash. When I upgraded my mac to macOS Catalina is changed the default shell to zsh. By going to the terminal and running the following command:
chsh -s /bin/bash
After running this command I was able to reset my shell to bash and the tns command ran with no other changes required.
Activity
svc76 commentedon Nov 14, 2015
I solved it myself after completely uninstalling node/npm, reinstalled node 4.2.2 from node js site, reinstalled nativescript. Now all looks set for my first prototype app. Phew... for a first impression, this is hard.
ligaz commentedon Nov 16, 2015
Thanks for this feedback. We are currently in the process of strengthening our getting started experience and one of the major pain points we are going to address is Node.js installation issues. Starting with 1.5 version of NativeScript we will have a black list of version of Node that are incompatible with the CLI. If you had such an incompatible version we will stop you from executing any command in the CLI and guide you into installing a greener version.
svc76 commentedon Nov 20, 2015
Thank you very much. I appreciate taking my feedback in.
donaldking commentedon Feb 22, 2016
Still cant get tns command to work! - command not found. Node version 4.3.1. Any fix yet?
rosen-vladimirov commentedon Feb 22, 2016
@donaldking , this issue had been resolved a while ago. Are you using nvm?
Can you try installing nativescript-cli and send us the output
npm i -g nativescript > out.txtdonaldking commentedon Feb 22, 2016
@rosen-vladimirov Thanks for the quick response. Its working now! :)
geyang commentedon Mar 5, 2016
I had the same problem. The problem on mac is that
The correct bash profile file should be
~/.profile. However,tnsended up adding the path to~/.bashrc.geyang commentedon Mar 5, 2016
To make matter even worse, as soon as tns adds the
.bashrcand.bash_profilefile, both iTerm and terminal start to read these by default, and all of the configurations in.profileare not sourced.jaferret commentedon May 18, 2016
out.txt
Ok so whats the solution? Any commands I need to execute? I'm having the same issue... How do I fix this?
bgillock commentedon Feb 8, 2017
I fixed this on my mac by adding:
export PATH=$PATH:~/.npm-packages/bin
to my ~/.bashrc
UtsavPreet commentedon Feb 23, 2018
I fixed this by manually coping the nativescript folder from my local node_modules folder to this location :-
/usr/local/Cellar/node@8/8.9.4/lib/node_modules/
then just added a path in .bash_profile file
PATH=$PATH:/usr/local/Cellar/node@8/8.9.4/lib/node_modules/nativescript/bin
I used Homebrew to install node so that is the reason for node@8 folder in my root
Hope this helps everyone who have been facing this issue
buitanan commentedon Sep 14, 2018
i ran this command in root
if you don't know password root: use this command to reset:
fcallegari7 commentedon Apr 4, 2019
I fixed that by exporting the PATH on the terminal.
Just run:
export PATH=$PATH:~/node_modules/nativescript/bin
getcodenow commentedon Jul 5, 2020
I encountered this issue just now. The solution for me was to change my default shell from zsh to bash. When I upgraded my mac to macOS Catalina is changed the default shell to zsh. By going to the terminal and running the following command:
chsh -s /bin/bash
After running this command I was able to reset my shell to bash and the tns command ran with no other changes required.
mudlabs commentedon Nov 1, 2020
@getcodenow that's the same issue I'm having. But it would be good to have a solution that worked with
zsh