kjda / reactjs-phonegap Goto Github PK
View Code? Open in Web Editor NEWA boilerplate ReactJS-Phonegap/Cordova App + Flux data flow
License: MIT License
A boilerplate ReactJS-Phonegap/Cordova App + Flux data flow
License: MIT License
I am a beginner to the Corss-platt Area.
As i folllow the document by create app, i get error as bellow:
How could i fix it? is the sample pass the new Cordova?
$ gulp create
[09:22:39] Using gulpfile ~/CordovaProject/ReactJs-Phonegap/app/gulpfile.js
[09:22:39] Starting 'create'...
gulp.run() has been deprecated. Use task dependencies or gulp.watch task triggering instead.
[09:22:39] Starting 'clean-app'...
[09:22:39] Finished 'clean-app' after 14 ms
[09:22:39] Starting 'create-app'...
/bin/sh: phonegap: command not found
[09:22:39] 'create-app' errored after 30 ms
[09:22:39] Error in plugin 'gulp-shell'
Message:
Command failed: /bin/sh -c phonegap create phonegap-app
/bin/sh: phonegap: command not found
Details:
killed: false
code: 127
signal: null
cmd: /bin/sh -c phonegap create phonegap-app
stdout:
stderr: /bin/sh: phonegap: command not found
[09:22:39] 'create' errored after 50 ms
[09:22:39] Error: [object Object]
at formatError (/usr/local/lib/node_modules/gulp-cli/index.js:173:10)
at Gulp. (/usr/local/lib/node_modules/gulp-cli/index.js:199:15)
at Gulp.emit (events.js:129:20)
at Gulp.Orchestrator._emitTaskDone (/Users/zxui/CordovaProject/ReactJs-Phonegap/app/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
at /Users/zxui/CordovaProject/ReactJs-Phonegap/app/node_modules/gulp/node_modules/orchestrator/index.js:275:23
at finish (/Users/zxui/CordovaProject/ReactJs-Phonegap/app/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/Users/zxui/CordovaProject/ReactJs-Phonegap/app/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at finish (/Users/zxui/CordovaProject/ReactJs-Phonegap/app/node_modules/gulp-run-sequence/index.js:35:5)
at Gulp.onError (/Users/zxui/CordovaProject/ReactJs-Phonegap/app/node_modules/gulp-run-sequence/index.js:41:4)
at Gulp.emit (events.js:129:20)
I am assuming the server folder contains an example server app that returns some basic stuff the app queries for, such as user information for login etc. If I am correct, what is the app using to communicate? JSON POST? I would want to make the server PHP based, that's why I am inquiring. New to React, thanks for your help!
This is really great! One thing I would like to see is how to deal with internationalization / multilingual ui.
I'm a little new to phonegap so let me know if there's something obvious I'm missing here.
I have phonegap 4.1.2-0.22.7 installed, when I follow the readme instructions the app.jsx render function (https://github.com/kjda/ReactJs-Phonegap/blob/master/app/src/app.jsx#L149) tries to return a loading div and throws "Uncaught Type Error: Object div has no method 'apply' ... coming from a createDescriptor method in the bundle.
This is happening when I run the app on my Droid Turbo on the Phonegap Developer App via my local network.
//edit: just tried on an iPhone 6 / iOS 8 and same error. Will try to poke around in the code to see if I can figure out what's going on.
//edit2: updating react to the latest version fixes this, it looks like the createDescriptor method has changed recently. PR opened.
Thanks!
after I run gulp serve, the chrome popups some message,and then the phonegap connecting to device page shows all the time
uncaught TypeError:undefined is not a function this error happen at www/js/bundle.js 224. please help.
Getting this exception running gulp create
Error: Cannot find module 'orchestrator'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/Users/Shared/java/projects/PhoneGap/ReactJs-Phonegap/app/node_modules/gulp/index.js:4:20)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
When I load the app in an iPhone or Android device, content shows normally. But on clicks or scroll it alerts this error:
TypeError: "undefined" is not an object ( evaluating 'method.apply' ) bundle.js 10885
In the browser it works.
When I start the PhoneGap Developer in adroid and point to the url displayed in console (gulp serve) the phone shows black screen and when I push Menu button displays this error message (cordova is not defined).
[09:04:10] Starting 'serve'...
[phonegap] starting app server...
[phonegap] listening on 192.168.1.43:3131
[phonegap]
[phonegap] ctrl-c to stop the server
[phonegap]
[phonegap] 200 /api/appzip
[phonegap] 200 /socket.io/socket.io.js
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1439363077427-0
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1439363077564-1&sid=5DHZIL0GZ_3IVuapAAAA
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.