vue 使用播放器插件 vue-video-player
报错:This dependency was not found:vue-video-player/node_modules/video.js/dist/video-js.css in ./src/main.jsTo install it, you can run: npm install --save vue-video-player/node_modules/video.js/dist/vid
·
npm run dev报错:
This dependency was not found:
* vue-video-player/node_modules/video.js/dist/video-js.css in ./src/main.js
To install it, you can run: npm install --save vue-video-player/node_modules/video.js/dist/video-js.css
原因vue-video-player插件引入错误
安装:
npm install vue-video-player -S
原本使用:
import VideoPlayer from 'vue-video-player'
require('vue-video-player/node_modules/video.js/dist/video-js.css')
require('vue-video-player/src/custom-theme.css')
Vue.use(VideoPlayer)
改成:
import VideoPlayer from 'vue-video-player'
require('video.js/dist/video-js.css')
require('vue-video-player/src/custom-theme.css')
Vue.use(VideoPlayer)
更多推荐
已为社区贡献3条内容
所有评论(0)