Rethinkdb and ionic 2 RC0

Hi,
Would like to upgrade my project to the RC0 version, I can not successfully integrate the library rethinkdb in the new version RC0 to connect to the server, steps:

  • npm install -g ionic

  • npm install -g cordova

  • ionic start MYAPP --v2

  • npm install rethinkdb --save

Open file app.module.ts and import ed insert rethinkdb:


import rethinkdb from ‘rethinkdb’;

@NgModule({

imports: [
IonicModule.forRoot(MyApp),
rethinkdb
],

})
export class AppModule {}

whene i compile with # ionic serve return this errors:

[13:21:57] bundle dev started …
[13:22:00] rollup: Treating ‘net’ as external dependency

[13:22:00] rollup: Treating ‘tls’ as external dependency

[13:22:00] rollup: Treating ‘events’ as external dependency

[13:22:00] rollup: Treating ‘crypto’ as external dependency

[13:22:01] rollup: Use of eval (in D:\smartapp\MYAPP\node_modules\bluebird\js\browser\bluebird.js) is strongly discouraged, as it poses security risks and may cause issues with minification. See https://github.com/rollup/rollup/wiki/Troubleshooting#avoiding-eval for more details

[13:22:02] rollup: No name was provided for external module ‘net’ in options.globals – guessing ‘net’
[13:22:02] rollup: No name was provided for external module ‘tls’ in options.globals – guessing ‘tls’
[13:22:02] rollup: No name was provided for external module ‘events’ in options.globals – guessing ‘events’

[13:22:02] rollup: No name was provided for external module ‘crypto’ in options.globals – guessing ‘crypto’

[13:22:04] bundle dev finished in 6.93 s
[13:22:04] sass started …
[13:22:05] sass finished in 1.23 s
[13:22:05] build dev finished in 10.60 s
[13:22:05] watch ready in 10.64 s

need help! thank you!!!

3 Likes

Did you ever find a solution to this?

No :sweat:.
I change my app with https://pouchdb.com/, rethinkDb is very good but non support ionic and “Off-line” first sync.