在Angular项目中导入video.js时出现问题

时间:2018-11-07 10:46:04

标签: javascript angular angular-cli video.js

我为video.js视频构建了一个组件,并通过以下方式将video.js导入了该组件

import videojs from 'video.js';

播放器和所有东西在开发模式下都能很好地工作,但是一旦我想用ng build --prod构建项目,就会发生以下错误:

  

92%的块资产优化LicenseWebpackPluginlicenseType.indexOf不是函数   TypeError:licenseType.indexOf不是函数       在LicenseTextReader.readLicense(C:\ GIT \ micromind-webapp \ node_modules \ license-webpack-plugin \ dist \ LicenseTextReader.js:29:40)       在PluginChunkReadHandler.processModule(C:\ GIT \ micromind-webapp \ node_modules \ license-webpack-plugin \ dist \ PluginChunkReadHandler.js:52:62)       在C:\ GIT \ micromind-webapp \ node_modules \ license-webpack-plugin \ dist \ PluginChunkReadHandler.js:29:23       在WebpackModuleFileIterator.iterateFiles(C:\ GIT \ micromind-webapp \ node_modules \ license-webpack-plugin \ dist \ WebpackModuleFileIterator.js:7:9)       在C:\ GIT \ micromind-webapp \ node_modules \ license-webpack-plugin \ dist \ PluginChunkReadHandler.js:27:32       在WebpackChunkModuleIterator.iterateModules(C:\ GIT \ micromind-webapp \ node_modules \ license-webpack-plugin \ dist \ WebpackChunkModuleIterator.js:21:21)       在PluginChunkReadHandler.processChunk(C:\ GIT \ micromind-webapp \ node_modules \ license-webpack-plugin \ dist \ PluginChunkReadHandler.js:26:29)       在_loop_1(C:\ GIT \ micromind-webapp \ node_modules \ license-webpack-plugin \ dist \ WebpackCompilerHandler.js:48:37)       在WebpackCompilerHandler.iterateChunks(C:\ GIT \ micromind-webapp \ node_modules \ license-webpack-plugin \ dist \ WebpackCompilerHandler.js:71:17)       在C:\ GIT \ micromind-webapp \ node_modules \ license-webpack-plugin \ dist \ WebpackCompilerHandler.js:29:27       在AsyncSeriesHook.eval [作为callAsync](在创建(C:\ GIT \ micromind-webapp \ node_modules \ tapable \ lib \ HookCodeFactory.js:32:10)时评估,:14:1)       在AsyncSeriesHook.lazyCompileHook(C:\ GIT \ micromind-webapp \ node_modules \ tapable \ lib \ Hook.js:154:20)       在hooks.additionalAssets.callAsync.err(C:\ GIT \ micromind-webapp \ node_modules \ webpack \ lib \ Compilation.js:1281:36)       在AsyncSeriesHook.eval [作为callAsync](在创建时(C:\ GIT \ micromind-webapp \ node_modules \ tapable \ lib \ HookCodeFactory.js:32:10)评估,:9:1)       在AsyncSeriesHook.lazyCompileHook(C:\ GIT \ micromind-webapp \ node_modules \ tapable \ lib \ Hook.js:154:20)       在hooks.optimizeTree.callAsync.err(C:\ GIT \ micromind-webapp \ node_modules \ webpack \ lib \ Compilation.js:1277:32)

有人可以帮我吗?我在video.js,videojs-font和video-vtt.js的node_modules中检查了许可证文件,它们都没有LICENSE.md,但是没有LICENSE文件...有什么解决方法?

0 个答案:

没有答案