I know Sencha is hard to learn, but I can't even get to first base and generate a starting App and I'm sure I'm not the only one!!! I have downloaded Sencha Touch SDK 2.3.1 (latest version) and Sencha CMD 5.0.1 (latest version). I have navigated to the Sencha Touch directory and typed in the command EVERYONE says to use to generate an app which is: sencha generate app MyApp ../MyApp On my mac I get errors as Sencha CMD tries to install the working directory and the SDK files. Is this a mac problem or am I missing something here?
Here is what I get:
[ERR] Directory /Users/Adam/Documents/Websites/touch not recognized as a framework
[ERR] Directory /Users/Adam/Documents/Websites/touch not recognized as a framework
[INF] Processing Build Descriptor : default
[INF] Loading app json manifest...
[INF] Concatenating output to file /Users/Adam/Documents/Websites/build/temp/production/myApp/sencha-compiler/cmd-packages.js
[INF] writing content to /Users/Adam/Documents/Websites/MyApp/bootstrap.js
[INF] appending content to /Users/Adam/Documents/Websites/MyApp/bootstrap.js
[INF] appending content to /Users/Adam/Documents/Websites/MyApp/bootstrap.js
[INF] appending content to /Users/Adam/Documents/Websites/MyApp/bootstrap.js
[INF] Appending content to /Users/Adam/Documents/Websites/MyApp/bootstrap.json
Also, the build and touch directories don't end up in the MyApp directory but instead one level up. So frustrating. Any help from anyone familiar with Sencha would be greatly appreciated. Thank you
I totally understand your frustration - 2 days is a long time to be stuck. Sencha can be so confusing....big learning curve!
In this situation you are better off changing your generate app command to specify the path to the touch directory and before generating the app, I would suggest you ensure you haven't already accidentally created an app in the websites folder, as this will throw you another error.
So, assuming your directory structure has websites/touch and you want your application generated in websites/myapp, I would suggest the following:
Ensure you are in your websites directory
check for hidden .sencha folder by typing ls -a
if it exists, remove it by typing rm -r .sencha
Create the folder you wish to generate your app into (eg: myapp)
change to that directory (cd myapp)
generate your app (sencha -sdk ../touch generate app MyTestApp .)
note: "../touch" is pointing to the touch directory in the parent folder
note: "MyTestApp ." is telling the system to generate an app called MyTestApp in the current folder.
See how you go with this - hope it helps!
Related
I'm using Ubuntu 16.04 and running this command below, inside ExtJS SDK folder;
root#nuri:/opt/lampp/htdocs/ext-6.5.0# sencha generate app MyApp ../demoapp
Sencha CMD runs and finishes without any problem and it keep displays only one line message:
[INF] Copying framework to /opt/lampp/htdocs/demoapp/ext
It creates the folder "demoapp" named as in command but bootstrap.js is missing! Thus I can not run the demo app with browser.
All I've noticed; I can not run the sencha command in terminal without root. It keep says sencha command not found. Therefore I'm switching to root with su command and then I'm being able to run sencha command.
UPDATE:
I've tried this command from Sencha CMD docs but still it doesn't create bootstrap.js
sencha -sdk /path/to/ext6 generate app MyApp /path/to/my-app
As well tried thorugh another Folder, inside /Home but still same!
and the solution:
I've ran sencha app build command in terminal, inside the demoapp
folder and then sencha app watch.
CMD created requried json files as well bootstrap.js and now I can display it.
Conclusion: Do not wait for build and watch command to run application on browser! Just do it after generation step...
I want to make a web app that is very similar to the extj5 portal example: http://dev.sencha.com/extjs/5.0.0/examples/portal/index.html
I would like to copy it to a different directory and start coding.
Here are the steps I am taking:
1) Copy portal directory to my working directory.
2) Cd into portal
3) Run the following on the command line.
sencha app upgrade ext-5.0.0 // Ext 5 and this app should be in the same directory
But when I do so, I get:
$ sencha app upgrade ext-5.0.0
Sencha Cmd v5.0.2.270
[WRN] Did not locate framework package
[WRN] Failed to resolve package ext-theme-neptune
[WRN] Failed to resolve package sencha-charts
[ERR] Theme "ext-theme-neptune" not found
[ERR] Required package "ext-theme-neptune" not found
Any advice on the proper way to do this? Ruby is properly installed and I was able to successfully go through the extjs 5 tutorial (generate app, watch app, etc.)
Sencha Cmd uses a lot of metadata, so your best bet is to generate a brand-new app in a blank folder first. Delete everything EXCEPT the /.sencha/ folder.
Then copy/paste the portal example (everything EXCEPT the /.sencha/ folder) into your new app.
You will also need to copy the /examples/ux/ folder, and then update the app.json file -- pointing classpath to the correct ux folder.
Normally this process would be easier, but the Ext JS download is essentially a "workspace", so copying one of the examples into a new place will miss a lot of the workspace's assumed structure (namely, the framework!)
I am working my way through the Getting Started tutorial for extJS at:
http://docs.sencha.com/extjs/5.0/getting_started/getting_started.html
I ran these commands:
sencha generate app -ext MyApp ./app
cd app
sencha app watch
I figured out I need to type "sencha web start" instead of "sencha app watch".
Now I go to
http://localhost:1841/
I can see the text on the left and on the right.
The left text is supposed to be in a Nav UI control.
The right is supposed to be in a Tab control.
But its just text. No UI.
What went wrong?
I can see folder structure and the ext framework it put there.
But it is just not rendering.
This issue happens when you are not in the application folder.
As per the tutorial you listed, you must have executed the following command :
sencha -sdk /ext-5.1.1 generate app MyApp ./app
While executing the sencha app watch command, we have to be in the "app" folder.
Points to keep in mind:
while executing the watch command you should get an output :
[INF] Starting web server at : http://localhost:1841
[INF] ------------------------------------------------------------------
[INF] Waiting for changes...
If this is not displayed, execute the below command:
sencha -d app build
This will give the entire log which will help in debugging the issue
Hope this helps.
So I am trying to set up another ExtJS (4.2.1) dev workstation I've got Ruby 1.9.3, Sencha Cmd 4.0.4.84 installed and latest Java VM too.
The build won't work on this one though, I'm getting:
[INF] executing compass using system installed ruby runtime
Errno::ENOENT on line ["38"] of C: No such file or directory - C:/devtfs/CustomerPortal/CustomerPortal.UI/Content/Customer_Portal_UI/build/temp/production/Customer_Portal_UI/slicer-temp/.sass-cache/82daaa66b7a4761963814fd25131bf0f81370ec9/Customer_Portal_UI-example.scssc
82daaa66b7a4761963814fd25131bf0f81370ec9 folder does exist, but it's empty.
I've tried
sencha ant clean
sencha app refresh
sencha app build --clean
No go. Ever seen this issue ?
Thanks!
EDIT: Hmm, even after this error, the application seems to be running fine on the Sencha web server, but the index.html file is the last thing that's not created in build/production.
I read a good-for-a-start post.
Then according to the author of the above post, I decided to get the requirements for Sencha mobile development: Sencha touch 2.1.1 GPL/commercial download, the SenchaCMD v4.0.2.67 which I have installed.
I have copied the Sencha touch-2.1.1 to the htdocs folder inside the xampp folder. So in other words, I don't need the SDK or anything else for now. I have also updated the PATH variable.
When I type this command: sencha generate app Helloworlds ..\Helloworlds, I get this output with errors:
C:\xampp\htdocs\senchaTouch> sencha generate app MyApp1 ../MyApp1
Sencha Cmd v4.0.2.67
[ERR] Unable to locate 'framework.dir' property from sencha.cfg
[ERR] Please ensure this command was executed from a valid framework directory
[ERR] Non-framework directory
So what should I do about this framework issue? And where is this framework.dir?
I tried to add the path of the installed SenchaCMD on it but this is what happened:
C:\xampp\htdocs\senchaTouch>sencha generate app Helloworld2 ..\C:\Users\Adrian\b
in\Sencha\Cmd\4.0.2.67\HelloWorld2
I obtain this output:
Sencha Cmd v4.0.2.67
[ERR] The filename, directory name, or volume label syntax is incorrect
I am confused. Where is the problem exactly?
May be its late. But Here is the link which provides step by step tutorial for developing your first Sencha Touch application and deploy it to Android.
mobiletechtutorials.blogspot.in