GatsbyJS - 未定义构建显示错误窗口(AOS)

时间:2018-01-06 13:50:21

标签: javascript reactjs animate.css gatsby

我是GatsbyJS和ReactJS的新手,我在构建项目时遇到了问题。 问题是每当我在其中使用AOS构建项目时,它都会显示错误窗口。我在开发模式下运行时完全没问题。

enter image description here

这是我的代码:

enter image description here

我读到componentDidMount()应该解决问题。不幸的是,它对我不起作用。

有任何帮助吗?谢谢..

1 个答案:

答案 0 :(得分:5)

我将代码更改为:

enter image description here

删除顶部的导入AOS。

一切都适合我。