问题描述
有人可以帮助我解决此错误吗?我不知道该如何解决。
TypeError: pouchdb__WEBPACK_IMPORTED_MODULE_3__ is not a constructor
- 这是data.service.ts的代码。
import { Injectable } from '@angular/core';
import { Connection } from '../../connection/connection';
import * as PouchDB from 'pouchdb';
@Injectable({
providedIn: 'root'
})
export class DataService {
public db: any;
public connection: Connection;
public remote: string = "";
public db_name: string = "";
constructor() {
this.connection = new Connection ("DEVELOPMENT");
}
Sync(db) {
this.remote = "http://oss.swmsb.com:6010/" + db;
this.db = new PouchDB(db);
let options = {
live: true,retry: true,continuous: true
};
this.db.sync(this.remote,options);
}
}
- 这是我的tsconfig.json
- 这是我的离子环境设置
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)