2
votes

I downloaded and installed Sencha Touch on my Mac (http://www.sencha.com/products/touch/download/sencha-touch-2.1/). Whenever I type sencha command in terminal I am getting the:

[WARN] The current working directory (/Users/jmc72) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode.

I tried to run it from different directories and output is the same.

My PATH looks like:

/Applications/SenchaSDKTools:
/Library/Frameworks/Python.framework/Versions/2.7/bin:
/Library/Frameworks/Python.framework/Versions/2.7/bin:
/usr/local/bin:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/Applications/SenchaSDKTools:
/Users/jmc72/Sites/senchaSDK:
/usr/X11/bin

My .bash_profile:

export PATH=/Applications/SenchaSDKTools:$PATH

export PATH=/Users/jmc72/Sites/senchaSDK:$PATH

Sencha SDK (documentation ?) is located in /Users/jmc72/Sites/senchaSDK and SDKTools are located in /Applications/SenchaSDKTools

EDIT Following the suggestion I created the .senchsdk file but now I am getting the following error:

sencha

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: Cannot find module '/Users/sadmin/Downloads/sencha-touch-2.1.0-commercial/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)

What am I doing wrong? Any help will be appreciated.

3

3 Answers

3
votes

You need to move to the directory of the Sencha SDK which you downloaded:

cd /Users/jmc72/Sites/senchaSDK

And then run the sencha command.

Update

If you are in the SDK folder, the only other problem you could have would be the SDK Tools version. Uninstall the current version you have and remove it from your path, and then install the latest version from here.

1
votes

Create a file '.senchasdk' in your project folder and in it simply type sdk and save... In your project folder ensure that your framework files such as sencha-touch.js, debug.js etc are in the sdk folder

Go to command line and type sencha again this time it should work...I faced this problem many times before it is because sencha command looks for a senchasdk hidden file hope it helps...

0
votes

That error is because you dont have sencha sdk directory in your project folder...

First create a dummy project using sencha generate app lets say demo... Go to the demo folder you will find a sdk folder there copy that and put it in your current project folder then try sencha command in your project folder again...

Reason for that error is because when you type sencha command in your project folder it searches for a node.js file inside the sdk folder i think the path is sdk/command/node.js or something(dont remember)... Probably in your current sdk folder the file is not present...