pmndrs / maath

🪶 Math helpers for the rest of us
https://maath.pmnd.rs
835 stars 18 forks source link

Syntax Error While Importing maath-random.esm.js #40

Closed Nlferu closed 10 months ago

Nlferu commented 10 months ago

Hello,

I'm building some project for web3 using TypeScript, React and NextJS along with Moralis. I'm facing below error every single time I refresh localhost. Once I remove component X(which contains maath) from app -> refresh host website is working correctly, then if I add that X component again and save file website will reload and animation is displayed and calculated correctly, everything working until I refresh website again. Does anyone have any idea how to fix that issue?

image

Here is repo with full code: LINK

Nlferu commented 10 months ago

Problem solved thanks to @asobiesk by changing import line from:

import * as random from "maath/random/dist/maath-random.esm"

into

import * as random from "maath/random"