zcuric / plyrue

Vue.js plugin for Plyr.io
MIT License
31 stars 6 forks source link

Webpack build throws mising dependency error #5

Closed jstlaurent closed 5 years ago

jstlaurent commented 5 years ago

Describe the bug When building an app using Webpack 4.35.0 to build an app using Vue 2.6.10 and Plyrue 2.0.4, Webpack throws a Module not found error:

ERROR in ./node_modules/plyrue/dist/plyrue.js
Module not found: Error: Can't resolve 'vue-runtime-helpers/dist/normalize-component.js' in '/Users/julien/projects/ideation6/front/node_modules/plyrue/dist'
 @ ./node_modules/plyrue/dist/plyrue.js 5:40-98
 @ ./src/main.js

To Reproduce

  1. Create a basic Vue project with a App.vue component
  2. Add Plyrue as a dependency: npm i plyrue
  3. Register Plyrue as a plugin in Vue, using the instructions in the doc:
    
    import App from './App.vue';
    import Plyrue from 'plyrue';
    import Vue from 'vue';

Vue.use(Plyrue);

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


4. Build the app using Webpack: `npx webpack --progress`
5. The Webpack build fails and outputs the error message

**Expected behavior**
The Webpack build completes successfully.

**Desktop:**
 - OS: MacOS 10.14.5
 - Browser: Firefox
 - Version: 68.0.1
 - Node 12.4.0
 - NPM 6.9.0

**Additional context**
The issue also appears when running the Webpack dev server.
francoism90 commented 5 years ago

Adding the missing packages to devDeps fixed the issue, see as reference https://github.com/xaksis/vue-good-table/issues/569

Think the missing dep should be added to the package to fix this issue. :)

zcuric commented 5 years ago

@jstlaurent Thanks for reporting. I'll take look.

@francoism90 Thanks for the reference.

francoism90 commented 5 years ago

@zcuric Just to confirm the latest release of plyrue fixed the issue, thanks. :)

zcuric commented 5 years ago

@francoism90 You are welcome :)