sencha-touch-2sencha-command

Sencha Touch 2: Cannot find module `/sencha-sdk-dir/command/sencha.js`


I am on Arch Linux x64 with Sencha Touch 2 x64 installed. From the SDK directory, I ran ./sencha

[jiewmeng@JM SenchaSDKTools-2.0.0-beta3]$ ./sencha
[WARN] The current working directory (/opt/SenchaSDKTools-2.0.0-beta3) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode.

Sencha Command v2.0.0 Beta 3
Copyright (c) 2012 Sencha Inc.

usage: sencha COMMAND [ARGS]

The available commands are:
   build            build a JSB project
   create bootstrapdata     generate boostrap data
   create jsb           generate a minimal JSB project for an app
   create locale            generate a template locale file from source
   create manifest      generate classes manifest
   package          package your Touch web app into a native bundle
   slice theme          slice a custom theme's images for IE

See 'sencha help COMMAND' for more information on a specific command.

I fixed that by adding a file .senchasdk with just "." init (as I figued Google-ing), but now I get

[jiewmeng@JM SenchaSDKTools-2.0.0-beta3]$ ./sencha

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: Cannot find module '/opt/SenchaSDKTools-2.0.0-beta3/command/sencha.js'
    at Function._resolveFilename (module.js:332:11)
    at Function._load (module.js:279:25)
    at Array.0 (module.js:479:10)
    at EventEmitter._tickCallback (node.js:192:40)

Whats wrong?


Solution

  • I solve this problem just adding the SDK path as a System Variable, and the run the command inside the sencha library folder, not the SDK folder.