Cannot find Titanium CLI - node.js

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

Related

npm-cli.js not found with the CLI command (in Windows 8.1 OS) npm -v

I am trying to install nodejs and npm in my computer with Windows 8.1 - 64 bit. I downloaded the msi from the official nodejs web site and installed it. When I tried to check the version of node by typing node -v, it worked perfectly. But when I tried to check whether npm is installed properly by typing npm -v, the following error appears.
How to fix this.Can someone help me in this. I referred the answers of similar questions here. And this also.But it did not worked too.
This is could because of incorrect installation. Have you tried reinstallation of Node and NPM? If not, uninstall from Program and Features and follow this walkthrough.
Also, need to set npm as global variable $PATH.

Appcelerator Unable to locate cli executable

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

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.

install cordova failed with node.js command prompt

what is my problem? is it successfully installed or failed? It doesn't seem right for me.
Cordova was installed successfully. You are looking at the dependency tree, so don't worry.
Bear in mind that you have installed the CLI tools. You have to actually create a cordova project with the command before you will see a cordova project.
cordova create <Your project name>

NPM - Can't install socket.IO

I am trying to install socket.io on windows with npm for use on a nodeJS server.
First, when I typed "npm install socket.IO" i had an error in the log saying something about python and node-gyp. I installed python 2.7.3 and set the environment variables.
Now I got a new error, which has something to do with visual studio (what the hell does VS have to do with npm ? Is it about the compiler? ).
The error is the same as here npm install for some packages (sqlite3, socket.io) fail with error MSB8020 on Windows 7
But when I use the option in the answer instead of the error it tells me something about a possible data loss (c4267) but doesn't log any error.
Then when I start my app, it tells me cannot find module socket.io still
What could this come from ?
Oh and also when i do npm config get root it tells me "undefined" could it have anything to do with it ?
Should I install the modules globally or locally ?
At least one of the packages in Socket.IO's dependency tree is a C/C++ addons which needs to be compiled on your system as it's installed. And, since it's a dependency, if it doesn't succeed in installing, neither will Socket.IO.
To enable cross-system compilation, Node.js uses node-gyp as its build system. You'll need to have it installed as a global package:
npm install -g node-gyp
As well as have its dependencies installed. Abridged version:
Python 2
C/C++ Compiler / Build Tools
For Windows, Microsoft Visual Studio 2013 (C++ or Windows Desktop) (Express edition)
For 64-bit, may need Windows 7 64-bit SDK
Then, you should be able to install Socket.IO as a local package so you can require it:
npm install socket.io
I had a similar problem on Mac.
What resolved my problem is installing a slightly older version of Socket.io.
I did:
npm install socket.io#"~0.8.1"
which would install the latest version between 0.8.0 to 0.8.9, but not 0.9.0 or above.
Socket.io then installed perfectly.
Make sure you have all the required software to run node-gyp:
https://github.com/TooTallNate/node-gyp
You can configure version of Visual Studio used by gyp via an environment variable so you can avoid having to set the --msvs_version=2012 property.
Examples:
set GYP_MSVS_VERSION=2012 for Visual Studio 2012
set GYP_MSVS_VERSION=2013e (the 'e' stands for 'express edition')
For the full list see
- https://github.com/joyent/node/blob/v0.10.29/tools/gyp/pylib/gyp/MSVSVersion.py#L209-294
This is still painful for Windows users of NodeJS as it assumes you have a copy of Visual Studio installed and many end users will never have this. So I'm lobbying Joyent to the encourage them to include web sockets as part of CORE node and also to possible ship a GNU gcc compiler as part of NodeJS install so we can permanently fix this problem.
Feel free to add your vote at:
https://github.com/joyent/node/issues/8005#issuecomment-50545326
The problem causing the compile failure is that the ws module installed by the engine.io module required by socket.io pulls in a backlevel version of nan. See https://github.com/BrowserSync/grunt-browser-sync/issues/95 for details. To work around the problem after the build failure:
cd to node_modules/socket.io/node_modules/engine.io/node_modules/ws
edit package.json to change the release of nan from 1.4.x to 1.6.0
issue command node-gyp rebuild
You should now be able to use socket.io
Another approach is to use Docker for Windows and spin up a NodeJS environment. While developing you can mount your Node code as a Docker volume and so continue to update your code from Windows but execute it and install it's dependencies inside a Linux VM. When you deploy you might prefer to use a Dockerfile that COPY's your Node code into your Docker image and so bakes it into the release image you deploy.
This approach might be required if you don't want to risk changing the socket.io version of your code or its dependencies.
It also may be a valuable solution if you planned to deploy to a corporate Intranet or public/private Cloud.
Docker can also be very handy for testing deployment under different versions of Node without disturbing the development environment of your Windows computer (e.g. for testing a NodeJS lib).
Official NodeJS Docker images
An explanation of how to use these images
this problem makes me very troubled..
I tried many solutions.
I installed .NET Framework 2.0 SDK.
I installed Python 2.7.x
I installed VS 2012 Express
I set some paths
I executed npm install xxx with the argument --msvs_version=2010(or 2012/2013..)...
But all failed.
finally, I uninstalled Python & .NET Framework 2.0 SDK & VS 2012, clear those paths,enable Windows Update, install all essential updates, restart my computer
then execute commands below:
npm install node-gyp -g
npm install socket.io -g
npm install browser-sync -g
there is no errors in installation logs.
Note : this solution may not work for you, but for me

Resources