backand / backand-ionic2-starter Goto Github PK
View Code? Open in Web Editor NEWAn Ionic 3 Starter for Backand Backend As A Service (BAAS)
Home Page: http://www.backand.com
An Ionic 3 Starter for Backand Backend As A Service (BAAS)
Home Page: http://www.backand.com
Thank you ever so much for the repo, I have been working in ionic serve and completely blown away by how powerful this is.
Current problem though is when I run on a device (android galaxy s5) I get error son all the api calls.
404 Not Found
this is on all of these and other auth ones too:
https://api.backand.com/1/objects/items?returnObject=true
https://api.backand.com/token
Tried to get the starter going but keep running into compilation issues below:
[17:05:13] ionic-app-scripts 0.0.27
[17:05:13] watch started ...
[17:05:13] build dev started ...
[17:05:13] clean started ...
[17:05:13] clean finished in 45 ms
[17:05:13] copy started ...
[17:05:13] typescript compiler started ...
[17:05:13] lint started ...
[17:05:14] copy finished in 749 ms
[17:05:17] lint finished in 3.53 s
[17:05:18] src/app/main.dev.ts(3,27): error TS2307: Cannot find module './app.module'.
[17:05:18] typescript compiler ready in 5.12 s
[17:05:18] bundle dev started ...
[17:05:18] Error: Could not resolve entry (./.tmp/app/main.dev.js)
at /Applications/MAMP/htdocs/projects/myApp/node_modules/rollup/dist/rollup.js:8602:28
at process._tickCallback (node.js:369:9)
[17:05:18] sass started ...
[17:05:18] sass failed: Cannot generate Sass files without first bundling JavaScript files in order to know all used modules. Please build JS files first.
[17:05:18] build dev failed: Build failed
[17:05:18] Missing module paths for sass build
npm -v = 3.10.8
ionic -v = 2.1.0
Also just noticed that its looking for this file /.tmp/app/main.dev.js however it does exist but just not within the app folder, its sitting here /.tmp/main.dev.js
ionic start myApp https://github.com/backand/backand-ionic2-starter --v2
This fails. There is no need for --v2. Can we get an updated version of this app with ionic 4 or at least 3? Thanks.
Hi, just following your readme file, I get an error when building for ios:
$ ionic start myApp https://github.com/backand/backand-ionic2-starter --v2 cd myApp
$ ionic plugin add cordova-plugin-inappbrowser
$ npm install socket.io-client --save
$ ionic build ios
$ ionic serve
works fine, but i get following build error… I did not modify any code in the starter. heres the console output. below I added the npm debug log. can you verify this happens on your end as well? As far as I see this has to do with socket.io
MacBook-Pro:myApp floriannorbertbepunkt$ ionic build ios
Running 'build:before' npm script before build
> ionic-hello-world@ build /Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp
> ionic-app-scripts build
[23:29:19] ionic-app-scripts 0.0.30
[23:29:19] build prod started ...
[23:29:19] clean started ...
[23:29:19] clean finished in 3 ms
[23:29:19] copy started ...
[23:29:19] ngc started ...
[23:29:19] lint started ...
[23:29:19] copy finished in 49 ms
[23:29:20] tslint: /Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp/src/providers/backandService.ts[38, 21]: Unused import: 'BehaviorSubject'
/Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp/src/providers/backandService.ts[39, 24]: Unused import: 'URLSearchParams'
/Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp/src/providers/backandService.ts[66, 13]: Unused property: 'is_auth_error'
/Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp/src/providers/backandService.ts[345, 17]: Unused variable: 'subscription'
[23:29:20] lint finished in 932 ms
[23:29:28] ngc: Error: Error at /Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp/.tmp/providers/backandService.ts:72:21: Cannot find namespace 'SocketIOClient'.
at check (/Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp/node_modules/@angular/tsc-wrapped/src/tsc.js:31:15)
at Tsc.typeCheck (/Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp/node_modules/@angular/tsc-wrapped/src/tsc.js:86:9)
at /Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp/node_modules/@angular/tsc-wrapped/src/main.js:33:23
at process._tickCallback (internal/process/next_tick.js:103:7)
at Function.Module.runMain (module.js:449:11)
at startup (node.js:148:18)
at node.js:405:3
[23:29:28] ngc: Compilation failed
[23:29:28] ngc failed: NGC encountered an error
[23:29:28] Error: NGC encountered an error
at ChildProcess.<anonymous> (/Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp/node_modules/@ionic/app-scripts/dist/ngc.js:62:24)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:484:12)
Error running ionic app script "build": Error: NGC encountered an error
npm
ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/Cellar/node5/5.12.0/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v5.12.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR!
ionic-hello-world@ build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm
ERR!
npm ERR! Failed at the ionic-hello-world@ build script 'ionic-app-scripts build'.
npm
ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm
ERR!
not with npm itself.
npm ERR!
Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build
npm ERR!
You can get information on how to open an issue for this project with:
npm
ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm
ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp/npm-debug.log
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
here's my npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node5/5.12.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle ionic-hello-world@~prebuild: ionic-hello-world@
6 silly lifecycle ionic-hello-world@~prebuild: no script for prebuild, continuing
7 info lifecycle ionic-hello-world@~build: ionic-hello-world@
8 verbose lifecycle ionic-hello-world@~build: unsafe-perm in lifecycle true
9 verbose lifecycle ionic-hello-world@~build: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp/node_modules/.bin:/usr/local/Cellar/node5/5.12.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
10 verbose lifecycle ionic-hello-world@~build: CWD: /Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp
11 silly lifecycle ionic-hello-world@~build: Args: [ '-c', 'ionic-app-scripts build' ]
12 silly lifecycle ionic-hello-world@~build: Returned: code: 1 signal: null
13 info lifecycle ionic-hello-world@~build: Failed to exec build script
14 verbose stack Error: ionic-hello-world@ build: `ionic-app-scripts build`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid ionic-hello-world@
16 verbose cwd /Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp
17 error Darwin 15.5.0
18 error argv "/usr/local/Cellar/node5/5.12.0/bin/node" "/usr/local/bin/npm" "run" "build"
19 error node v5.12.0
20 error npm v3.10.8
21 error code ELIFECYCLE
22 error ionic-hello-world@ build: `ionic-app-scripts build`
22 error Exit status 1
23 error Failed at the ionic-hello-world@ build script 'ionic-app-scripts build'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the ionic-hello-world package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error ionic-app-scripts build
23 error You can get information on how to open an issue for this project with:
23 error npm bugs ionic-hello-world
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls ionic-hello-world
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Error: Cannot find module "parseuri"
at webpackMissingModule (http://localhost:8100/build/main.js:124598:80)
at Object. (http://localhost:8100/build/main.js:124598:165)
at Object. (http://localhost:8100/build/main.js:124669:30)
at webpack_require (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:124483:11)
at webpack_require (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:18737:75)
at webpack_require (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:58753:84)
at webpack_require (http://localhost:8100/build/main.js:20:30)
Ionic Framework: 2.0.0-rc.5
Ionic Native: 2.2.11
Ionic App Scripts: 1.0.0
Angular Core: 2.2.1
Angular Compiler CLI: 2.2.1
Node: 6.9.2
OS Platform: Windows 10
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Hi @kornatzky, thanks for the starter, has helped no end.
I have hit a bit of a roadblock after trying to expand on your code. I am trying to implement a custom query but not sure how to do so. The standard http.get command you have detailed looks like so:
return this.http.get(this.api_url + '/1/objects/items?returnObject=true', {
headers: this.authHeader
})
.retry(3)
.map(res => res.json().data);
But if i have a custom query that has a Request $Http command as so how do I call it in a similar way to your http.get above in Ionic2/Angular2?
return $http ({
method: 'GET',
url: Backand.getApiUrl() + '/1/query/data/get_specific_data',
params: {
parameters: {
a: 'foo',
b: 'bar'
}
}
});
Many thanks in advance for any help you can provide.
Cheers
George
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.