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

Runing with Nuxt - Missing Jquery? #90

Open
flaviocordova opened this issue Apr 14, 2022 · 4 comments
Open

Runing with Nuxt - Missing Jquery? #90

flaviocordova opened this issue Apr 14, 2022 · 4 comments

Comments

@flaviocordova
Copy link

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.

@flaviocordova
Copy link
Author

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.

@flaviocordova
Copy link
Author

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

@dobromir-hristov
Copy link
Owner

There is no jQuery dependency in this package.

@dobromir-hristov
Copy link
Owner

At least no one ever complained or had to install it. Very odd.

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

2 participants