vue-vimeo-player
vue-vimeo-player copied to clipboard
Runing with Nuxt - Missing Jquery?
I've followed the instructions for using vue-vimeo-player with nuxt but it seems it still misses something related to JQuery:
On console I get this:
This dependency was not found: friendly-errors 19:55:01
friendly-errors 19:55:01
* __webpack_provided_window_dot_jQuery in ./node_modules/@vimeo/player/dist/player.es.js friendly-errors 19:55:01
friendly-errors 19:55:01
To install it, you can run: npm install --save __webpack_provided_window_dot_jQuery friendly-errors 19:55:01
and on browser I get this message:
ERROR in ./node_modules/@vimeo/player/dist/player.es.js
Module not found: Error: Can't resolve 'jquery' in '<path>/node_modules/@vimeo/player/dist'
Is there any best practice to fix it? Probably it should be added to the docs.
I also get a warning:
<src-path>/plugins/vimeo-player.js
2:8 warning Using exported name 'vueVimeoPlayer' as identifier for default export import/no-named-as-default
I fixed it changing the import in plugin to:
import { vueVimeoPlayer } from 'vue-vimeo-player'
Not sure if it's right since I'm still having the jquery problem above.
I had this on my nuxt.config.js
build: {
plugins: {
// set shortcuts as global for bootstrap
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
}),
}
}
I removed this code and it seems to work now
There is no jQuery dependency in this package.
At least no one ever complained or had to install it. Very odd.