Skip to content
This repository was archived by the owner on Aug 22, 2020. It is now read-only.
This repository was archived by the owner on Aug 22, 2020. It is now read-only.

ERROR: Uncaught (in promise): MissingDriverError: Wrong driver sqlite given. Supported drivers are: "mysql", "mysql2", "postgres", "mssql", "oracle", "mariadb", "sqlite". Error #7

@AgustinJimenez

Description

@AgustinJimenez

I am new on ionic, for this proyect i am using the last ionic version, when i tried to use ionic-orm from BradyLiles/ionic-orm on my provider this happen

Uncaught (in promise): MissingDriverError: Wrong driver sqlite given. Supported drivers are: "mysql", "mysql2", "postgres", "mssql", "oracle", "mariadb", "sqlite". Error at new MissingDriverError ... at ConnectionManager.createDriver ... at ConnectionManager.create ... at ConnectionManager. ... at Generator.next ... at new t ... at __awaiter ... at ConnectionManager.createAndConnectByConnectionOptions ... at ConnectionManager.

i dont know what is going wrong, and i can't post this on stack overflow (my english is bad)
this is my provider:

import "reflect-metadata";
import { Injectable } from '@angular/core';
import { createConnection } from 'ionic-orm';
import { Photo } from "./../../entities/Photo";
@Injectable()
export class Connection
{
public create_connection = createConnection;
public connection = {
driver:
{
type: "sqlite",
host: "localhost",
port:"3306",
username:"root",
password:"admin",
database:"test"
},
entities: [/"../src/entities/.js"*/Photo],
autoSchemaSync:true
};

constructor(/create_connection: createConnection/)
{
console.log( this.connection );
this.query();
}

query()
{
return this.create_connection(this.connection);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions