在vue+typescript中怎么使用vue-video-player?

发布于 2022-09-11 14:36:09 字数 812 浏览 6 评论 0

问题描述

在vue+typescript中怎么使用vue-video-player?

问题出现的环境背景及自己尝试过哪些方法

按照官网安装vue-video-player,结果在页面中引入的时候,报错
Could not find a declaration file for module 'vue-video-player'. '/Users/wangjie/Desktop/skyeye/node_modules/_vue-video-player@5.0.2@vue-video-player/dist/vue-video-player.js' implicitly has an 'any' type.
Try npm install @types/vue-video-player if it exists or add a new declaration (.d.ts) file containing declare module 'vue-video-player';

然后执行npm install @types/vue-video-player,报错

npm ERR! code E404
npm ERR! 404 Not Found: @types/vue-video-player@latest

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wangjie/.npm/_logs/2018-10-22T12_27_17_681Z-debug.log

对typeScript不是很熟悉,求指导!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

暖风昔人 2022-09-18 14:36:09
declare module "vue-video-player";
旧故 2022-09-18 14:36:09

这个库可能没有提供.d.ts 可能需要你自己写一下

暗恋未遂 2022-09-18 14:36:09

请问你是怎么解决的

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文