Comments (7)
Can you share a repository to reproduce this error? feathers-hooks-common
populate should not be used or imported on the client.
from feathers-hooks.
So, sorry, i tried to reproduce, but it did not occur today, maybe some options wrong with my webpack config. i will close this issues, if i meet it again, i will reopen it.
thank you, @daffl
from feathers-hooks.
Getting this error as well:
These dependencies were not found:
* feathers-hooks-common/lib/populate in ./~/feathers-hooks/lib/hooks.js
* feathers-hooks-common/lib/bundled in ./~/feathers-hooks/lib/hooks.js
To install them, you can run: npm install --save feathers-hooks-common/lib/populate feathers-hooks-common/lib/bundled
ERROR in ./~/feathers-hooks/lib/hooks.js
Module not found: Error: Can't resolve 'feathers-hooks-common/lib/populate' in '/Users/david/Data/git/node/test/node_modules/feathers-hooks/lib'
@ ./~/feathers-hooks/lib/hooks.js 13:16-61
@ ./~/babel-loader/lib?{"presets":["vue-app"],"cacheDirectory":true}!./~/vue-loader/lib/selector.js?type=script&index=0!./pages/auth/login.vue
@ ./pages/auth/login.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi webpack-hot-middleware/client?reload=true ./.nuxt/client.js
ERROR in ./~/feathers-hooks/lib/hooks.js
Module not found: Error: Can't resolve 'feathers-hooks-common/lib/bundled' in '/Users/david/Data/git/node/test/node_modules/feathers-hooks/lib'
@ ./~/feathers-hooks/lib/hooks.js 15:15-59
@ ./~/babel-loader/lib?{"presets":["vue-app"],"cacheDirectory":true}!./~/vue-loader/lib/selector.js?type=script&index=0!./pages/auth/login.vue
@ ./pages/auth/login.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi webpack-hot-middleware/client?reload=true ./.nuxt/client.js
from feathers-hooks.
from feathers-hooks.
Thanks for the swift answer. Am new to feather.js and until now only used node for compiling es6 vue.js components to work with rest API's for frameworks in other languages. But can you elaborate exactly what's up with feathers-hooks-common? I tried to use the following vue.js (nuxt.js) component when I ended up with the error above.
<script>
import feathers from 'feathers/client'
import rest from 'feathers-rest/client'
import auth from 'feathers-authentication-client'
import hooks from 'feathers-hooks'
import axios from 'axios'
import localStorage from 'localstorage-memory'
const host = 'http://localhost:3030'
const app = feathers().configure(hooks())
.configure(rest(host).axios(axios))
.configure(auth({ storage: localStorage }))
const userService = app.service('users')
export default {
layout: 'auth',
data() {
return {
loginForm: {
email: '',
password: ''
}
}
},
methods: {
login() {
console.log(this.loginForm);
}
}
}
</script>
When using feathers-hooks-common I get:
TypeError: __WEBPACK_IMPORTED_MODULE_3_feathers_hooks_common___default(...) is not a function
at Object.exports.modules.Array.concat.Object.defineProperty.value (login.vue:28:0)
at __webpack_require__ (webpack:/webpack/bootstrap 88ec5359c6ec0ae585f9:25:0)
at Object.exports.modules.Array.concat.Object.defineProperty.value (pages/auth/login.vue:3:0)
at __webpack_require__ (webpack:/webpack/bootstrap 88ec5359c6ec0ae585f9:25:0)
Many thanks!
from feathers-hooks.
What version of feathers hooks common are you using? The latest is 3.0.0. All hooks are available off require ('feathers-hooks-common') with no subfolders.
I don't see it being used in the example above.
from feathers-hooks.
THis is a duplicate of #149
from feathers-hooks.
Related Issues (20)
- Composing Hooks HOT 4
- Population fails on empty values HOT 1
- Calling populate(target, options) is now DEPRECATED HOT 3
- how to get service name(path) in hook functions? HOT 2
- Gravatar example doesn't work?! HOT 15
- Test Hooks HOT 8
- feathers-hooks-common/lib/populate, feathers-hooks-common/lib/bundled not found. HOT 7
- [feature request] provide a way to swallow error in error hooks HOT 5
- An in-range update of mongoose is breaking the build 🚨
- `__hooks` of existing service should not be overwritten HOT 4
- __hooks being overwritten HOT 3
- Add hook to the top of others hook HOT 5
- [discussion] maybe change the name of the context parameter from 'hook' to 'context' or use 'this' in the future? HOT 10
- Params are not populated when called internally HOT 1
- Error: 'chck' is not a valid hook method HOT 1
- Hook typings HOT 3
- Angular 4 feathers hook build fails - "All declarations of 'Service' must have identical type parameters" HOT 3
- Populate hook with array of one ref return object not an array. HOT 1
- Call others service then, dissallow original service
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feathers-hooks.