Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ionic run build --prod give Repository not found error #16

Open
pcfjojo opened this issue Apr 17, 2018 · 2 comments
Open

Ionic run build --prod give Repository not found error #16

pcfjojo opened this issue Apr 17, 2018 · 2 comments

Comments

@pcfjojo
Copy link

pcfjojo commented Apr 17, 2018

In developement and Prod android version works fine. But when I tried with the browser. I get the error.
I follow the [https://github.com/typeorm/ionic-example]

Any help?

here is my config file.

import { Expense } from './../entities/expense';
import { Medicine } from './../entities/medicine';
import { Client } from './../entities/client';
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { createConnection } from 'typeorm'
import { Company } from '../entities/company';
import { Order } from '../entities/order';
import { OrderDetail } from '../entities/orderDetail';

@Component({
  templateUrl: 'app.html'
})
export class MyApp {
  rootPage: string = "LoginPage";

  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
    platform.ready().then(async () => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      statusBar.styleDefault();
      splashScreen.hide();

      // Depending on the machine the app is running on, configure
      // different database connections
      if(platform.is('cordova')) {
        // Running on device or emulator
        await createConnection({
          type: 'cordova',
          database: 'test',
          location: 'default',
          synchronize: true,
          logging: ['error', 'query', 'schema'],
          entities: [
            Client,Medicine,Company, Order, OrderDetail, Expense
          ]
        });
      } else {
        // Running app in browser
        await createConnection({
          type: 'sqljs',
          autoSave: true,
          location: 'browser',
          synchronize: true,
          logging: ['error', 'query', 'schema'],
          entities: [
            Client, Medicine, Company, Order, OrderDetail, Expense
          ]
        });
      }
    });
  }
}
@daniel-lang
Copy link
Contributor

If your app runs on a device in development and production mode, it should also work in the browser in both modes.
Can you provide a small repository for me to take a look at it?

@pcfjojo
Copy link
Author

pcfjojo commented Apr 18, 2018

@daniel-lang
I have create a repo please check it out https://github.com/pcfjojo/Easymedi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants