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

PouchDB Find is a requirement for LiveFind and must be loaded first. #11

Closed
iBobik opened this issue Sep 15, 2019 · 1 comment
Closed

Comments

@iBobik
Copy link

iBobik commented Sep 15, 2019

Error: "ERROR: PouchDB Find is a requirement for LiveFind and must be loaded first."
liveFind index.js:14
created index.js:1242
$watch VueJS
created index.js:1186
created index.js:1176
VueJS 28
main.js:18
js app.js:4554
webpack_require app.js:727
fn app.js:101
0 app.js:4664
webpack_require app.js:727
app.js:794
app.js:797
vue.runtime.esm.js:1888

I load it in Vue-Webpack stack like this:

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './registerServiceWorker'
import PouchVue from 'pouch-vue';

Vue.config.productionTip = false

import PouchDB from 'pouchdb-browser'
PouchDB.plugin(require('pouchdb-find'));
PouchDB.plugin(require('pouchdb-live-find'));

Vue.use(PouchVue, {
  pouch: PouchDB,
  defaultDB: 'pos'
});

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')

I tried to reorder PouchDB.plugin lines but error is the same.

@iBobik
Copy link
Author

iBobik commented Sep 15, 2019

Solved by loading plugins like this:

import PouchFind from 'pouchdb-find'
import PouchLiveFind from 'pouchdb-live-find'
PouchDB.plugin(PouchFind);
PouchDB.plugin(PouchLiveFind);

@iBobik iBobik closed this as completed Sep 15, 2019
mholtzhausen added a commit to mholtzhausen/pouch-vue that referenced this issue Mar 12, 2020
Fixes documentation resulting in [this issue](colinskow/pouchdb-live-find#11):
`PouchDB Find is a requirement for LiveFind and must be loaded first.`
MDSLKTR pushed a commit to MDSLKTR/pouch-vue that referenced this issue Mar 13, 2020
Fixes documentation resulting in [this issue](colinskow/pouchdb-live-find#11):
`PouchDB Find is a requirement for LiveFind and must be loaded first.`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant