Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2253] Unable to run npm to install Titanium CLI. Gives same error.

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-11-21T01:08:58.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
LabelsCLI, Studio, Titanium, nodejs, npm
ReporterErvin Avendano
AssigneeMauro Parra-Miranda
Created2013-11-04T21:35:04.000+0000
Updated2016-03-08T07:41:15.000+0000

Description

Steps to Reproduce

Follow 2 steps, get errors either way: 1. Check for and install Titanium updates within Titanium Studio 2. On Mac OSX terminal type: sudo npm install titanium -g

Actual Result

Following copied from log file: !ENTRY com.aptana.js.core 4 0 2013-11-04 12:38:04.307 !MESSAGE (Build 3.1.3.201309132423) [ERROR] Failed to install titanium. node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Cannot call method 'apply' of undefined at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:63:25) at EventEmitter.log (native) at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:137:21) at EventEmitter.info (native) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:20:5 at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:86:2) at Module._compile (module.js:404:26) at Object..js (module.js:410:10) at Module.load (module.js:336:31) at Function._load (module.js:297:12) !ENTRY com.aptana.js.core 4 0 2013-11-04 12:38:04.973 !MESSAGE (Build 3.1.3.201309132423) [ERROR] Failed to install acs. node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Cannot call method 'apply' of undefined at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:63:25) at EventEmitter.log (native) at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:137:21) at EventEmitter.info (native) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:20:5 at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:86:2) at Module._compile (module.js:404:26) at Object..js (module.js:410:10) at Module.load (module.js:336:31) at Function._load (module.js:297:12) !ENTRY com.aptana.js.core 4 0 2013-11-04 12:38:05.639 !MESSAGE (Build 3.1.3.201309132423) [ERROR] Failed to install alloy. node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Cannot call method 'apply' of undefined at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:63:25) at EventEmitter.log (native) at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:137:21) at EventEmitter.info (native) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:20:5 at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:86:2) at Module._compile (module.js:404:26) at Object..js (module.js:410:10) at Module.load (module.js:336:31) at Function._load (module.js:297:12) !ENTRY com.appcelerator.titanium.update 4 4 2013-11-04 12:38:05.643 !MESSAGE Error encountered during update !SUBENTRY 1 com.aptana.js.core 4 0 2013-11-04 12:38:05.643 !MESSAGE Failed to install titanium. Please see the Studio log for more information. !SUBENTRY 1 com.aptana.js.core 4 0 2013-11-04 12:38:05.643 !MESSAGE Failed to install acs. Please see the Studio log for more information. !SUBENTRY 1 com.aptana.js.core 4 0 2013-11-04 12:38:05.643 !MESSAGE Failed to install alloy. Please see the Studio log for more information.

Expected Result

Should install Titanium CLI to enable me to run device emulators in Titanium Studio.

Attachments

FileDateSize
.log2013-11-04T21:35:07.000+000017011
.log2013-11-04T21:35:06.000+00004657

Comments

  1. Ervin Avendano 2013-11-04

    This is my first time submitting a ticket here. I am attempting to get Titanium Studio to work on Mac OSX. I don't see why there are 2 .log files attached, I only attached one file.
  2. Mauro Parra-Miranda 2013-11-04

    Hello, AFAIK, npm's infrastructure is down today. Please try to install later. npm is the NodeJS package manager that every single project in NodeJS uses, and looks like is the first time that is down. Best, Mauro
  3. Stephen Feather 2013-11-04

    um, you DO know that at this very moment (monday november 4 2013) NPM itself is having technical problems.... Until that is resolved, be difficult to confirm/test your issue. Consider following (https://twitter.com/npmjs) to see when the NPM problem is resolved and then retests your scenario.
  4. Ervin Avendano 2013-11-04

    I will follow the twitter feed, see if that solves it. I have been trying for a few days though to test out my code but since Titanium CLI will not install I cannot proceed with my project.
  5. Stephen Feather 2013-11-04

    Understand. There are ways to install packages from a local directory, but the problem with that route is that titanium has a number of prerequisite packages that would need to be pulled from npm as well. I know its frustrating, wait to see if they get their act together. If you still have problems after npm is stable, we can help you from there.
  6. Ervin Avendano 2013-11-05

    I just checked again for updates within Titanium Studio, I still get the same errors. Also ran the diagnostic tool, below is what I got: Host OS: Mac OS X OS Version: 10.8.5 OS Arch: x86 JRE Version: 1.6.0_65 JRE Vendor: Apple Inc. JRE Home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Titanium Studio Version: 3.1.3.201309132423 Install Directory: file:/Applications/Titanium Studio/ Workspace Directory: file:/Users/ervinaven/Documents/Titanium_Studio_Workspace/Full_Sail_University/VFW1311/ VM Arguments: -Xms40m -Xmx1024m -Declipse.p2.unsignedPolicy=allow -Declipse.log.size.max=10000 -Declipse.log.backup.max=5 -Xdock:icon=../Resources/titanium.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -XX:MaxPermSize=256m -Djava.class.path=/Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS//../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar Language: en_US ACS App URL: https://api.cloud.appcelerator.com/v1/apps/create.json?key=7fI2AZHmrSvAHNKsSQKzrSXz5NWjo2tt ACS Login URL: https://api.cloud.appcelerator.com/v1/admins/studio_login.json?key=7fI2AZHmrSvAHNKsSQKzrSXz5NWjo2tt Android SDK Version: Google APIs Android 4.3 Android NDK Version: r8e (64-bit) XCode Version: 5.0.1 Latest Titanium SDK: 3.1.3.GA Titanium SDK Version: 3.1.3 SDK Modules API Version:2 SDK Timestamp: 09/18/13 12:00 SDK Build Number: 222f4d1 SDK Location: /Users/ervinaven/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA Browsers - Default system web browser: Unknown (N/A) - Firefox: 24.0 (/Applications/Firefox.app/Contents/MacOS/firefox-bin) Titanium CLI Enabled: true Node.ACS Host URL: null Node.JS Version: Not installed NPM Path: /usr/local/bin/npm NPM Version: node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Cannot call method 'apply' of undefined at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:63:25) at EventEmitter.log (native) at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:137:21) at EventEmitter.info (native) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:20:5 at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:86:2) at Module._compile (module.js:404:26) at Object..js (module.js:410:10) at Module.load (module.js:336:31) at Function._load (module.js:297:12) node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Cannot call method 'apply' of undefined at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:63:25) at EventEmitter.log (native) at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:137:21) at EventEmitter.info (native) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:20:5 at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:86:2) at Module._compile (module.js:404:26) at Object..js (module.js:410:10) at Module.load (module.js:336:31) at Function._load (module.js:297:12) Packages: node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Cannot call method 'apply' of undefined at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:63:25) at EventEmitter.log (native) at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:137:21) at EventEmitter.info (native) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:20:5 at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:86:2) at Module._compile (module.js:404:26) at Object..js (module.js:410:10) at Module.load (module.js:336:31) at Function._load (module.js:297:12) ENV: DBUS_LAUNCHD_SESSION_BUS_SOCKET=/tmp/launch-TDh0V3/unix_domain_listener SHELL=/bin/bash ANDROID_NDK=/Users/ervinaven/Documents/Android/android-ndk-r8e TMPDIR=/var/folders/_0/sb5dh_k16zzgjjr2ylld_0l80000gn/T/ SHLVL=1 __CF_USER_TEXT_ENCODING=0x1F5:0:0 PATH=/Users/ervinaven/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:$HOME/bin:/usr/local/git/bin:/usr/local/share/npm/bin:/Users/ervinaven/.npm/titanium/3.1.2/package/bin:/usr/local/bin:/usr/local/lib/node_modules/npm/bin APTANA_VERSION=3.1.3.1377024923 COMMAND_MODE=unix2003 redirectErrorStream= USER=ervinaven com.apple.java.jvmTask=JNI PWD=/Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS HOME=/Users/ervinaven LOGNAME=ervinaven Apple_Ubiquity_Message=/tmp/launch-k7Cghs/Apple_Ubiquity_Message NPM_CONFIG_PREFIX=/Users/ervinaven Apple_PubSub_Socket_Render=/tmp/launch-YINs3L/Render SSH_AUTH_SOCK=/tmp/launch-b4WMsA/Listeners LANG=en_US.UTF-8 Somewhere along the middle is the following: Node.ACS Host URL: null Node.JS Version: Not installed NPM Path: /usr/local/bin/npm NPM Version: node.js:134 throw e; // process.nextTick error, or 'error' event on first tick So does that tell me that Node.JS is not installed? Also gives the NPM Path as '/usr/local/bin/npm' so is that the location where it should be installed? Is there a way to just install the package from nodejs.org and make it install or point to that location? Remember I am running Titanium Studio on a Mac.
  7. Ervin Avendano 2013-11-06

    I was able to fix the issue. Before I installed Titanium Studio I updated Xcode to v5, but it did not update the command tools. To do that I had to go to preferences and do it manually. After that Studio detected nodeJS and I was able to install the missing components.
  8. Stephen Feather 2013-11-06

    Ervin, glad you got it figured out. Both tooling sets (xcode and android) require a lot of picky little things to get them running on their own, then throw in the extra binding tools that appc uses and lots of potential for things to go wrong or get missed during setup.
  9. Mauro Parra-Miranda 2013-11-21

    Fixed by the user (configuration issue).

JSON Source