vue报错:Module not found: Error: Can't resolve 'hls.js' in

WAIT Compiling... 12:47:14

98% after emitting CopyPlugin

WARNING Compiled with 1 warnings 12:47:15

warning in ./node_modules/_vue-aplayer@1.6.1@vue-aplayer/dist/vue-aplayer.min.js

Module not found: Error: Can't resolve 'hls.js' in 'D:WebstormProjectsstart-front-endnode_modules_vue-aplayer@1.6.1@vue-aplayerdist'
不知道怎么解决
image.png

阅读 10.1k
1 个回答

试试:

npm install --save hls.js

or

module.exports \= {
  entry: ...,
  output: ...,
+ externals: 'hls.js'
}

vue-aplayer 的issue中有一个跟你一样的问题,供你参考:
https://github.com/SevenOutma...

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏