tidev / gittio

Search & Install all Titanium Modules and Alloy Widgets on GitHub
http://gitt.io
Other
24 stars 19 forks source link

cannot install using gittio #110

Closed aaronksaunders closed 8 years ago

aaronksaunders commented 8 years ago
gittio install nl.fokkezb.loading
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn titanium ENOENT
    at exports._errnoException (util.js:860:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at doNTCallback2 (node.js:450:9)
    at process._tickCallback (node.js:364:17)
IMac27Quad:Moonlighting2.0 aaronksaunders$ 

Version information, also i do use nvm

node -v   v5.0.0
appc -v 5.1.0
yuchi commented 8 years ago

@FokkeZB IMHO I think all these issues around the accessibility of the titanium-cli are calling for the creation of a titanium-cli-wrapper official package that correctly forwards the execution to the right command.

FokkeZB commented 8 years ago

Well, that's what I made https://www.npmjs.com/appc-compat for, but it seems there's some issues.

aaronksaunders commented 8 years ago

so is the solution here to alias titanium ? Not really following the how the wrapper will get me moving again?

FokkeZB commented 8 years ago

@aaronksaunders well, this error originates from https://github.com/dbankier/timodules/blob/master/lib/timodules.js#L50 which already uses appc-compat to either use ti or appc ti depending on what you have installed. But there appears to be a problem with that. However, if you trace it back you'll see I do listen tot he error event? Would you have time to do some local debugging?

  1. https://github.com/dbankier/timodules/blob/master/lib/timodules.js#L50
  2. https://github.com/FokkeZB/appc-compat/blob/master/index.js#L49
  3. https://github.com/FokkeZB/appc-compat/blob/master/index.js#L8
  4. https://github.com/FokkeZB/appc-compat/blob/master/index.js#L28
  5. https://github.com/FokkeZB/appc-compat/blob/master/lib/spawn.js#L7
  6. https://github.com/FokkeZB/appc-compat/blob/master/lib/spawn.js#L35
yuchi commented 8 years ago

Sorry @FokkeZB didn’t know about appc-compat. I’ll have a look!

nuno commented 8 years ago

same here I still can't use gittio :(, any tip to make that run?

FokkeZB commented 8 years ago

@nuno could you try to trace back the steps I mentioned above?

nuno commented 8 years ago

@FokkeZB How so? Also I have both node installed , ti (open source) and the appc. Could be an issue?

FokkeZB commented 8 years ago

If you have both ti and appc the issue is even weirder ;)

Anyway, you would have to either clone this repo and do sudo npm link . or go into your node_modules folder and add logs to the files I listed as you've installed it from NPM.

Since I cannot reproduce that would be very helpful to nail this bug.

xryzor commented 8 years ago

I'm having the same problem. What do you need me to do to help you with this bug?

FokkeZB commented 8 years ago

@xryzor We need to understand why gittio (or actually timodules or appc-compat) can't find the global CLI.

If you could add a log for the stdout here: https://github.com/dbankier/timodules/blob/master/lib/timodules.js#L34-L37 Then we could see what it actually is returning.

If you could add a log for the cmd here: https://github.com/FokkeZB/appc-compat/blob/master/index.js#L27 Then we could see if it using appc ti or ti

If you could add a log for the e here: https://github.com/FokkeZB/appc-compat/blob/master/lib/exists.js#L18 Then we could see if the check for the CLI works

xryzor commented 8 years ago

I think I did it right:

e -> '' (blank) cmd -> 'appc' stdout ->

{
    "global": {
        "android": {
            "facebook": {
                "4.0.5": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/android/facebook/4.0.5",
                    "version": "4.0.5",
                    "manifest": {
                        "version": "4.0.5",
                        "apiversion": "2",
                        "architectures": "armeabi armeabi-v7a x86",
                        "description": "facebook",
                        "author": "Mark Mokryn and Ashraf A. S. (Appcelerator)",
                        "license": "Apache License Version 2.0",
                        "copyright": "Copyright (c) 2014 by Mark Mokryn, Copyright (c) 2009-2015 by Appcelerator",
                        "respackage": "com.facebook.android",
                        "name": "Facebook",
                        "moduleid": "facebook",
                        "guid": "e4f7ac61-1ee7-44c5-bc27-fa6876e2dce9",
                        "platform": "android",
                        "minsdk": "4.0.0"
                    },
                    "platform": [
                        "android"
                    ]
                }
            },
            "ti.cloudpush": {
                "3.4.0": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/android/ti.cloudpush/3.4.0",
                    "version": "3.4.0",
                    "manifest": {
                        "version": "3.4.0",
                        "apiversion": "2",
                        "architectures": "armeabi armeabi-v7a x86",
                        "description": "ACS Push notifications for Android",
                        "author": "Dawson Toth, Jeff English, Paul Lv and Jon Alter",
                        "license": "Appcelerator Commercial License",
                        "copyright": "Copyright (c) 2012-2014 by Appcelerator, Inc.",
                        "name": "cloudpush",
                        "moduleid": "ti.cloudpush",
                        "guid": "2d542783-c83c-4597-bd61-1073aa16ece2",
                        "platform": "android",
                        "minsdk": "3.3.0"
                    },
                    "platform": [
                        "android"
                    ]
                },
                "3.4.1": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/android/ti.cloudpush/3.4.1",
                    "version": "3.4.1",
                    "manifest": {
                        "version": "3.4.1",
                        "apiversion": "2",
                        "architectures": "armeabi armeabi-v7a x86",
                        "description": "ACS Push notifications for Android",
                        "author": "Dawson Toth, Jeff English, Paul Lv and Jon Alter",
                        "license": "Appcelerator Commercial License",
                        "copyright": "Copyright (c) 2012-2014 by Appcelerator, Inc.",
                        "name": "cloudpush",
                        "moduleid": "ti.cloudpush",
                        "guid": "2d542783-c83c-4597-bd61-1073aa16ece2",
                        "platform": "android",
                        "minsdk": "5.0.0.GA"
                    },
                    "platform": [
                        "android"
                    ]
                }
            },
            "ti.map": {
                "2.3.3": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/android/ti.map/2.3.3",
                    "version": "2.3.3",
                    "manifest": {
                        "version": "2.3.3",
                        "apiversion": "2",
                        "architectures": "armeabi armeabi-v7a x86",
                        "description": "External version of Map module to support new Google Map v2 sdk",
                        "author": "Hieu Pham",
                        "license": "Apache Public License v2",
                        "copyright": "Copyright (c) 2013 by Appcelerator, Inc.",
                        "name": "map",
                        "moduleid": "ti.map",
                        "guid": "f0d8fd44-86d2-4730-b67d-bd454577aeee",
                        "platform": "android",
                        "minsdk": "4.1.0",
                        "respackage": "com.google.android.gms"
                    },
                    "platform": [
                        "android"
                    ]
                },
                "2.3.4": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/android/ti.map/2.3.4",
                    "version": "2.3.4",
                    "manifest": {
                        "version": "2.3.4",
                        "apiversion": "2",
                        "architectures": "armeabi armeabi-v7a x86",
                        "description": "External version of Map module to support new Google Map v2 sdk",
                        "author": "Hieu Pham",
                        "license": "Apache Public License v2",
                        "copyright": "Copyright (c) 2013 by Appcelerator, Inc.",
                        "name": "map",
                        "moduleid": "ti.map",
                        "guid": "f0d8fd44-86d2-4730-b67d-bd454577aeee",
                        "platform": "android",
                        "minsdk": "4.1.0",
                        "respackage": "com.google.android.gms"
                    },
                    "platform": [
                        "android"
                    ]
                }
            }
        },
        "commonjs": {
            "ti.cloud": {
                "3.2.9": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/commonjs/ti.cloud/3.2.9",
                    "version": "3.2.9",
                    "manifest": {
                        "version": "3.2.9",
                        "description": "Appcelerator Cloud Services",
                        "author": "Dawson Toth, Jeff English, Jon Alter, Paul Lv, Michael Goff, and Pedro Enrique",
                        "license": "Appcelerator Commercial License",
                        "copyright": "Copyright (c) 2011-2014 by Appcelerator,  Inc.",
                        "name": "ti.cloud",
                        "moduleid": "ti.cloud",
                        "guid": "1056b5d2-2bb5-4339-b930-297637aeec4e",
                        "platform": "commonjs",
                        "minsdk": "2.1.0"
                    },
                    "platform": [
                        "commonjs"
                    ]
                }
            }
        },
        "iphone": {
            "com.appcelerator.urlSession": {
                "1.1.1": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/iphone/com.appcelerator.urlSession/1.1.1",
                    "version": "1.1.1",
                    "manifest": {
                        "version": "1.1.1",
                        "apiversion": "2",
                        "architectures": "i386 x86_64 armv7 arm64",
                        "description": "Allows access to NSURLSession for background network sessions.",
                        "author": "srahim",
                        "license": "Apache Public License v2",
                        "copyright": "Copyright (c) 2009-2015 by Appcelerator, Inc.",
                        "name": "UrlSession",
                        "moduleid": "com.appcelerator.urlSession",
                        "guid": "cbf3cdea-b7e8-4375-bdfb-70fb9307054d",
                        "platform": "iphone",
                        "minsdk": "3.2.0.GA",
                        "hyperloop": "true"
                    },
                    "platform": [
                        "ios",
                        "iphone"
                    ]
                },
                "2.0.0": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/iphone/com.appcelerator.urlSession/2.0.0",
                    "version": "2.0.0",
                    "manifest": {
                        "version": "2.0.0",
                        "apiversion": "2",
                        "architectures": "armv7 arm64 i386 x86_64",
                        "description": "ti.urlsession",
                        "author": "Your Name",
                        "license": "Specify your license",
                        "copyright": "Copyright (c) 2015 by Your Company",
                        "name": "ti.urlsession",
                        "moduleid": "com.appcelerator.urlSession",
                        "guid": "276644d1-41e7-4c67-88a3-55d4fbfa0f24",
                        "platform": "iphone",
                        "minsdk": "3.5.0.GA"
                    },
                    "platform": [
                        "ios",
                        "iphone"
                    ]
                }
            },
            "facebook": {
                "4.0.5": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/iphone/facebook/4.0.5",
                    "version": "4.0.5",
                    "manifest": {
                        "version": "4.0.5",
                        "apiversion": "2",
                        "description": "Allows facebook integration for Titanium apps",
                        "author": "Mark Mokryn and Ng Chee Kiat",
                        "license": "Apache License Version 2.0",
                        "copyright": "Copyright (c) 2009-2015 by Appcelerator, Inc.",
                        "name": "Facebook",
                        "moduleid": "facebook",
                        "guid": "da8acc57-8673-4692-9282-e3c1a21f5d83",
                        "platform": "iphone",
                        "minsdk": "4.0.0",
                        "architectures": "armv7 arm64 i386 x86_64"
                    },
                    "platform": [
                        "ios",
                        "iphone"
                    ]
                }
            },
            "ti.coremotion": {
                "1.1.0": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/iphone/ti.coremotion/1.1.0",
                    "version": "1.1.0",
                    "manifest": {
                        "version": "1.1.0",
                        "apiversion": "2",
                        "architectures": "i386 x86_64 armv7 arm64",
                        "description": "Allows access to CoreMotion.",
                        "author": "Jon Alter",
                        "license": "Apache Public License v2",
                        "copyright": "Copyright (c) 2014 by Appcelerator, Inc.",
                        "name": "CoreMotion",
                        "moduleid": "ti.coremotion",
                        "guid": "cbf3cdea-b7e8-4375-bdfb-70fb98675309",
                        "platform": "iphone",
                        "minsdk": "3.2.0.GA",
                        "hyperloop": "true"
                    },
                    "platform": [
                        "ios",
                        "iphone"
                    ]
                }
            },
            "ti.map": {
                "2.4.1": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/iphone/ti.map/2.4.1",
                    "version": "2.4.1",
                    "manifest": {
                        "version": "2.4.1",
                        "apiversion": "2",
                        "architectures": "armv7 arm64 i386 x86_64",
                        "description": "External version of Map module",
                        "author": "Jeff Haynie, Jon Alter, & Pedro Enrique",
                        "license": "Apache Public License v2",
                        "copyright": "Copyright (c) 2013-2015 by Appcelerator, Inc.",
                        "name": "map",
                        "moduleid": "ti.map",
                        "guid": "fee93b77-8eb3-418c-8f04-013664c4af83",
                        "platform": "iphone",
                        "minsdk": "3.5.0"
                    },
                    "platform": [
                        "ios",
                        "iphone"
                    ]
                },
                "2.5.2": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/iphone/ti.map/2.5.2",
                    "version": "2.5.2",
                    "manifest": {
                        "version": "2.5.2",
                        "apiversion": "2",
                        "architectures": "armv7 arm64 i386 x86_64",
                        "description": "External version of Map module",
                        "author": "Jeff Haynie, Jon Alter, & Pedro Enrique",
                        "license": "Apache Public License v2",
                        "copyright": "Copyright (c) 2013-2015 by Appcelerator, Inc.",
                        "name": "map",
                        "moduleid": "ti.map",
                        "guid": "fee93b77-8eb3-418c-8f04-013664c4af83",
                        "platform": "iphone",
                        "minsdk": "4.0.0"
                    },
                    "platform": [
                        "ios",
                        "iphone"
                    ]
                }
            },
            "ti.safaridialog": {
                "1.0.2": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/iphone/ti.safaridialog/1.0.2",
                    "version": "1.0.2",
                    "manifest": {
                        "version": "1.0.2",
                        "apiversion": "2",
                        "architectures": "armv7 arm64 i386 x86_64",
                        "description": "TiSafariDialog",
                        "author": "Benjamin Bahrenburg",
                        "license": "Apache License, Version 2.0",
                        "copyright": "Copyright (c) 2014 by Appcelerator, Inc.",
                        "name": "TiSafariDialog",
                        "moduleid": "ti.safaridialog",
                        "guid": "c2b0df2f-43e2-4811-aa9e-c0a91c158d33",
                        "platform": "iphone",
                        "minsdk": "5.0.0.GA"
                    },
                    "platform": [
                        "ios",
                        "iphone"
                    ]
                },
                "1.0.3": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/iphone/ti.safaridialog/1.0.3",
                    "version": "1.0.3",
                    "manifest": {
                        "version": "1.0.3",
                        "apiversion": "2",
                        "architectures": "armv7 arm64 i386 x86_64",
                        "description": "TiSafariDialog",
                        "author": "Benjamin Bahrenburg",
                        "license": "Apache License, Version 2.0",
                        "copyright": "Copyright (c) 2014 by Appcelerator, Inc.",
                        "name": "TiSafariDialog",
                        "moduleid": "ti.safaridialog",
                        "guid": "c2b0df2f-43e2-4811-aa9e-c0a91c158d33",
                        "platform": "iphone",
                        "minsdk": "5.0.0.GA"
                    },
                    "platform": [
                        "ios",
                        "iphone"
                    ]
                }
            },
            "ti.touchid": {
                "1.2.0": {
                    "modulePath": "/Users/xry/Library/Application Support/Titanium/modules/iphone/ti.touchid/1.2.0",
                    "version": "1.2.0",
                    "manifest": {
                        "version": "1.2.0",
                        "apiversion": "2",
                        "architectures": "armv7 arm64 i386 x86_64",
                        "description": "TouchId Module",
                        "author": "Pedro Enrique & CheeKiat Ng",
                        "license": "Apache License, Version 2.0",
                        "copyright": "Copyright (c) 2014 by Appcelerator, Inc.",
                        "name": "TouchID",
                        "moduleid": "ti.touchid",
                        "guid": "0ee4118b-68f9-47c6-8c37-d68778ecb806",
                        "platform": "iphone",
                        "minsdk": "3.4.1.GA"
                    },
                    "platform": [
                        "ios",
                        "iphone"
                    ]
                }
            }
        }
    }
}
FokkeZB commented 8 years ago

Thanks @xryzor! So you do get data back from timodules.

What is exactly the error you see. Is it indeed the same that @aaronksaunders reported?

Error: spawn titanium ENOENT
    at exports._errnoException (util.js:860:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at doNTCallback2 (node.js:450:9)
    at process._tickCallback (node.js:364:17)
IMac27Quad:Moonlighting2.0 aaronksaunders$ 
xryzor commented 8 years ago

gittio install nl.fokkezb.loading

events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: spawn titanium ENOENT
    at exports._errnoException (util.js:856:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:474:9)
    at process._tickCallback (node.js:388:17)

node v5.5.0

FokkeZB commented 8 years ago

@xryzor perhaps this happens here: https://github.com/FokkeZB/gittio/blob/master/lib/config.js#L160

Because indeed I don't seem to handle the error even there: https://github.com/FokkeZB/gittio/blob/master/lib/exec.js

You do have the titanium CLI (not appc ti but ti) installed?

FokkeZB commented 8 years ago

Just pushed a new version that should take care of all this.

nuno commented 8 years ago

Thanks @FokkeZB and @xryzor for your time debug and fixing! Works as expected!

xryzor commented 8 years ago
[INFO]  nl.fokkezb.loading added to config.json
[INFO]  nl.fokkezb.loading@1.8.4:ios,android,blackberry,mobileweb installed

Thank you! :) Glad to be of any help!