-1

Around 4 days ago I made a little website with some particles in the background that could interact with your mouse cursor using tsParticles.

When I tried to build/run that site today it gave me the following error:

../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;

I literally changed nothing, no code, no dependencies.

HIMEJI
  • 1
  • 1
  • Are you using Webpack v4? I believe its parser doesn't support optional chaining; you'll need to have Babel transpile `tsparticles` in `node_modules/` – rschristian Aug 25 '23 at 21:19
  • Please provide enough code so others can better understand or reproduce the problem. – Community Aug 25 '23 at 23:37

0 Answers0