Giter VIP home page Giter VIP logo

Comments (7)

daffl avatar daffl commented on June 3, 2024

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.

denghuiquan avatar denghuiquan commented on June 3, 2024

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.

bdschr avatar bdschr commented on June 3, 2024

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.

eddyystop avatar eddyystop commented on June 3, 2024

from feathers-hooks.

bdschr avatar bdschr commented on June 3, 2024

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.

eddyystop avatar eddyystop commented on June 3, 2024

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.

eddyystop avatar eddyystop commented on June 3, 2024

THis is a duplicate of #149

from feathers-hooks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.