尝试使用 tsParticles 构建 React App 时出错

问题描述 投票:0回答:1

大约 4 天前,我制作了一个小网站,背景中有一些粒子,可以使用 tsParticles 与鼠标光标交互。

当我今天尝试构建/运行该网站时,出现以下错误:

../node_modules/tsparticles-interaction-external-connect/esm/Connector.js 101:27
Module parse failed: Unexpected token (101:27)
You may need an appropriate loader to handle this file type.
|       var container = this.container,
|         mouse = container.interactivity.mouse,
>         events = (particle?.interactivity ?? container.actualOptions.interactivity).events;
|       if (!(events.onHover.enable && mouse.position)) {
|         return false;

我实际上没有更改任何内容,没有代码,没有依赖项。

reactjs particles react-particles-js
1个回答
0
投票

在没有改变任何东西的情况下,当我今天早上尝试运行它时,它再次工作了。

© www.soinside.com 2019 - 2024. All rights reserved.