Appcelerator Unable to locate cli executable - node.js

I am using OSX El Capitain and have just downloaded Appcelerator Studio. After the installation I tried to run it and when I try to log in I receive this error message: Unable to locate CLI executable (print screen below). I have already installed NodeJs downloaded directly from Appcelerator website.
How could I solve this?

There could have been an issue installing the the CLI depending on permissions. Appcelerator Studio installs node (if required), appcelerator CLI, Titanium CLI and others into a package underneath the AppceleratorStudio.app package. This is to ensure that it has those available.
I would recommend checking your permissions and potentially re-installing Appcelerator Studio from the link :
web.appcelerator.com
Additionally you could install the CLI's globally using the following commands:
sudo npm i -g appcelerator
sudo npm i -g titanium
sudo npm i -g alloy
Once they are installed, see about running studio again to see if you still have issues.

Maybe your CLI is not be installed properly that's why you get this error. So try to install the CLI manually through the terminal respectively
sudo npm install -g appcelerator
appc use latest
appc setup
sudo npm install -g alloy
Here's the documents link -
https://web.appcelerator.com/product/cli
Then open the studio. Hope this helps.
Regards,
Appcelerator support.

Apart from the reason given by #bert-g, it might also because an old version of node (i.e. node 0.10) was installed instead of 0.12.
I was using nvm for node version control. When starting the app from application icon, it stuck at the same screenshot. Therefore I have tried to start the app from console (i.e. /Applications........./AppceleratorStudio) and it complains my node version should be 0.12. Used nvm install 0.12 and run from console again, it works!

So whenever dev tools have problems with CLI things, the first thing I do is reinstall Xcode. Fixed everything almost every time.
This should unlink the libraries, uninstall, and remove Xcode
Go to Terminal and run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo rm -rif ~/Applications/Xcode.app
Then go to the App Store and reinstall Xcode
Do make sure you are up to date, install the CLI tools from HERE
You need both Xcode and the CLI tools. I am not sure if the CLI tools are downloaded with Xcode so make sure by downloading both.
Please let me know if this works!
Update: Must have Appcelerator CLI installed and configured as well

Related

Install Yarn after NPM

I need some help and clarification regarding Yarn installation process.
MacOS ver. 10.14.2
I've installed Homebrew via official site (ver. 2.0.1).
I've installed NPM by downloading package from official site (ver. 10.15.1 LTS).
Now when I tried to install yarn via brew install yarn
I have the following error:
The post-install step did not complete successfully
You can try again using `brew postinstall node`
As I undertand, NPM installs node locally, when, for instance, I try to use create-react-app. When I use Homebrew to install yarn, it tries to install node globally. And we have conflict here.
I've found suggestion to use:
sudo chown -R `whoami`:admin /usr/local/
I am not entirely sure what this command does.
So, the questions are:
Why changing the owner of the folder should be a solution? How will it affect multi user system?
What is the correct way to install yarn?
Can be there any conflicts if node is installed globally and locally (app folder.)
P.S. Please correct me, if I have wrong understanding here.
As Trott points out, npm does not install Node. npm is a package manager that comes bundled with Node. If you install Node, you automatically install npm.
Why changing the owner of the folder should be a solution? How will it affect multi user system?
It's not. Changing the permissions of this folder is sometimes suggested as a workaround for when you have npm installed in a location owned by root. This can cause EACCES errors when you try to install packages globally.
What is the correct way to install yarn?
While you can install Yarn through the Homebrew package manager, I would recommend doing: npm install -g yarn.
Can be there any conflicts if node is installed globally and locally (app folder).
You can't install Node globally and locally. You can install multiple versions of Node on the same machine, however.
I'm not a big fan of having one global Node installation, as it makes it a pain to update (esp. if one application relies on an older version of Node) and, depending on how you install Node, it can lead to permissions errors.
The better way is to use a version manager. This will allow you to install multiple Node versions on your machine, avoid permissions errors and swap between these Node versions at will.
I would recommend using nvm. It works nicely on MacOS. The TL;DR for installing nvm is:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
But I would encourage you to look at the project on GitHub and read its README. There is also a good tutorial on how to use it here.
Once you have Node installed using nvm, run npm install -g yarn to install Yarn globally and you should be off to the races.
Finally, you might want to read this tutorial on using npm, as it could help to clear up some of the concepts.
HTH
I have faced a problem after install yarn by running npm install -g yarn command in my OS Windows 10 Pro. That was showing yarn' is not recognized as an internal or external command operable program or batch file.
Whatever, I have found the solution:
After npm,
go to CMD from your windows PC,
write : *npm install -g yarn*
then,
Go to Environmental Variables set up.
Edit Path and add new and paste:
C:\Users\User\AppData\Roaming\npm\node_modules\yarn\bin\
Restart your terminal. And then check again in your cmd by running :
*yarn* or *yarn --version*

unable to install electron on high sierra

I have been trying to install electron using npm on high sierra and I am unable to do so, sudo or changing folder permission, nothing seems to work.
I did see this error on several posts but most of them point to using the correct node version. Some links I checked: 1 2
I was on version 9.2.1 but switched to version 8.2.1 based on what I saw in electron.
Below is the screenshot of the error:
Is this because for some reason I am forbidden from adding certain files to my root? I have tis doubt because of late I am having a lot of hassle installing any software. Is there a way to get rid of this problem for good?
I had faced same problem, the reason behind is the installer you use to install your node either brew or nvm doesn't has root access privileges.
brew :- By default brew doen't have root access permission to install applications.
nvm :- same case for nvm, Installed Node doen't have root access permission to install libs.
First option, Install nodejs manually by downloading from server, install it and then try to install electron by using following command
npm install electron --save-dev
or
sudo npm install electron --save-dev
Second option, give the nvm or brew root privileges

How to completely uninstall Cordova

since I updated my mac to Sierra I noticed a strange behaviour in my cordova app: some plugins aren't working anymore, it just seems they are not copied in the ios platform even if when I add the Platform the plugins' folders are copied as usual. It just seems xcode ignore them.
I tried a few things: removing and adding again plugins, updating cordova, uninstalling and reinstalling cordova, updating platforms, trying creating a brand new app... nothing seems to fix the problem.
Searching around I found this command:
$ cordova platform update ios --save
and it worked without doing anything else.
Unfortunately I have to use this command everytime I make a change in the app and I remove and add the platform again so I guess it's a problem in my environment.
I would like to completely uninstall cordova, node.js and git and reinstall everything again. I found a few instructions like in this question for node.js How do I uninstall nodejs installed from pkg (Mac OS X)? but I don't know how to run correctly all of the commands, some of them fail.
Uninstalling cordova and reinstalling works but doesn't solve the problem.
I did it with
$ sudo npm install -g cordova
$ sudo npm uninstall -g cordova
Can someone link me where to find clear instructions step by step? I'm not that good with command line and I really want to fix this problem without formatting the whole system.
Thank you for any help!
Think I have the solution: I removed cordova,
sudo npm uninstall -g cordova
deleted the .cordova folder in my user home folder (it's a hidden folder!) and installed cordova again with
sudo npm install -g cordova
I noticed that one of my old cordova projects was working: remove platform, add platform and by default I had ios platform version 4.3.0. GOOD!
In another cordova project created after latest update it was still using ios platform 4.2.1.
In the root project folder there is the config.xml file and in this file I found this line in just the second project:
<engine name="ios" spec="~4.2.1" />
Just removed and now cordova is using by default the latest version of the ios platform.
I don't know exactly why in one project there was this line and why not in the other one... neither know if I updated the platform in one project before reinstalling cordova and after reinstalling in onther... can't remember.
I just know that now if I create a new project it's correctly using ios platform 4.3.0 and I tried to describe all my steps...
I hope it will be useful for anyone else because I was ready to format my mac to fix this :(
I don't think you really have a problem with node or npm.
It seems to me more the kind of problem that happen when you change your node version without rebuilding node_modules directory.
If you always install modules with --save modifier, try this:
rm -rf node_modules
npm install
...if not, you can make a backup of your node_modules first. But it will be useful only to inspect it to figure out what modules are missing in your 'package.json' file.

Error while installing ionic framework

I have looked at the other questions and answers but still my issue is not solved.
I have successfully installed node.js
Node version: 0.12.7
NPM version: 2.11.3
Now when I install Cordova, there are some warnings but it does get installed.
After that when I try to install ionic, it shows all errors and doesn't install.
I am on a Windows machine... so I am not using the 'sudo' in the command.
I haven't also tried to install the JDK, Apache Ant and Android SDK. Are they needed while installing?
Please let me know if you want screenshots.
Thank you
In windows system there is no need to write sudo,we can use npm install -g ionic to install ionic framework
Steps to work Ionic Framework
1)you have to install nodeJS
2)you have to install Java and configure it's path in environmental variables.
3)you have to install Apache-ant
4)you have to install Android-sdk and configure it's path in environmental variables
for reference please see these links Install Ionic Framework, Ionic frameowrk on windows7,8
For any queries reply
Try running command prompt as an administrator before running the commands, that always fixed it for me.

Cannot find Titanium CLI

I ran off this cmd after switching node versions for use with Titanium studio.
sudo npm install -g alloy titanium
However even though it appears to install. Neither alloy nor titanium seem to be linked to my bash profile.
I tried:
dave:~ $ titanium -v
-bash: titanium: command not found
Node and npm were originally installed with homebrew and I now have both 0.10.2 and 0.8.22 packages.
I also cannot launch the app in the SDK due to the fact it cannot find the titanium CLI.
Can anyone help me resolve this problem.
Screenshot of actual error http://cl.ly/image/1j1T3U2n2h0L
The Titanium CLI requires Node.js 0.10.x or newer to be installed
reference: https://github.com/appcelerator/titanium
Before using the Titanium CLI to create and build Titanium projects, you need to make sure your development environment is correctly configured.
For reference please visit official documentation.
http://docs.appcelerator.com/platform/latest/#!/guide/Titanium_CLI_Tasks

Resources