Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import chimee 报错 Error: Can't resolve 'core-js/es7/global' #358

Open
skjgithub950423 opened this issue Aug 13, 2020 · 0 comments
Open

Comments

@skjgithub950423
Copy link

Expected Behavior【期望行为】

可以正常引入,不报错

Current Behavior【实际表现】

使用import 的方式引入,在项目启动时直接报错,编译未通过

Possible Solution 【可选方案】

将node_modules中chimee/lib/index.js中var global = _interopDefault(require('core-js/es7/global'));注释掉

Steps to Reproduce【复现方法】

import React, { useLayoutEffect } from 'react'
import Chimee from 'chimee'
import ChimmeeKernelHls from 'chimee-kernel-hls'

import './index.less'

const MonitorCenter: React.FC = (props): JSX.Element => {
useLayoutEffect(() => {
const chimee = new Chimee({
wrapper: '#video-wrapper',
src: '//vjs.zencdn.net/v/oceans.mp4',
video: {
autoplay: true,
muted: false,
meted: 'meted'
}
// isLive: true,
// kernels: {
// hls: ChimmeeKernelHls
// }
})
chimee.on('play', () => console.log('play!'))
chimee.play()
})
return


}

export default MonitorCenter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant