简体   繁体   English

无法安装ionic2 SQLite插件

[英]Can't install ionic2 SQLite plugin

I work on Window, with MINGW64 bash.我使用 MINGW64 bash 在 Window 上工作。 I create an Ionic 2 project and add the SQLite plugin with the following line :我创建了一个 Ionic 2 项目并使用以下行添加 SQLite 插件:

$ ionic plugin add cordova-sqlite-storage

When I run my project, with : $ ionic serve --lab当我运行我的项目时,使用: $ ionic serve --lab

My project start and is displayed on Firefox, but in my console I have the following line :我的项目启动并显示在 Firefox 上,但在我的控制台中,我有以下行:

Native: tried accessing the SQLite plugin but it's not installed.    main.js
Install the SQLite plugin: 'ionic plugin add cordova-sqlite-storage' main.js

But I don't have a "main.js" file in my project, I have only a main.ts file which contain :但是我的项目中没有“main.js”文件,我只有一个 main.ts 文件,其中包含:

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app.module';

platformBrowserDynamic().bootstrapModule(AppModule);

Does the plugins can be run on the emulate device on the web browser ?插件是否可以在网络浏览器的模拟设备上运行?

The plugins don't get loaded in ionic serve as @suraj pointed out.正如@suraj 指出的那样,插件不会加载到离子服务中。 Try running it in the browser platform.尝试在浏览器平台上运行它。

ionic platform add browser离子平台添加浏览器

ionic run browser离子运行浏览器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM