在我的项目Highway.js Tweenmax中安装的软件包上出现错误

时间:2019-04-19 19:14:21

标签: javascript tweenmax

我收到此错误:

slide_up.js:2 Uncaught TypeError: Super expression must either be null or a function
    at _inherits (slide_up.js:2)
    at slide_up.js:6
    at Object.parcelRequire.js/slide_up.js.@dogstudio/highway (slide_up.js:18)
    at newRequire (main.fb6bbcaf.js:47)
    at localRequire (main.fb6bbcaf.js:53)
    at Object.parcelRequire.js/main.js.@dogstudio/highway (main.js:2)
    at newRequire (main.fb6bbcaf.js:47)
    at main.fb6bbcaf.js:81
    at main.fb6bbcaf.js:120

关于slide_up.js中的导入。我正在使用动画库和一个名为Highway.js的软件包。我尝试安装@ babel / core。。我真的不太确定该错误意味着什么,我们将不胜感激任何帮助。

import Highway from '@dogstudio/highway';
import { TimelineLite } from 'gsap';



class SlideUp extends Highway.transition {
  //responsible for page coming in
  in({ from, to, done }) {
    const timeline = new TimelineLite();

    timeline.fromTo(to, 0.5, {top: '100%'}, {top: '0%', onComplete: function(){
      done();
    }})
  }
  //responsible for page going out
  out({ from, done }) {
    done();
  }
}


export default SlideUp;

0 个答案:

没有答案