tsparticles / astro

tsParticles Astro official component
MIT License
38 stars 4 forks source link

Example doesnt work - Class extends value undefined is not a constructor or null #18

Closed humanusdeus closed 3 months ago

humanusdeus commented 7 months ago

I cant get tsParticles to work on any environment, I was building a project just using vite and typescript when I started getting this same error " Class extends value undefined is not a constructor or null", after hours of debugging with the bundler I decided to switch to Astro for an easier implementation but I get the same output. Im not running any extra code, I create a new astro project and copy paste the example. It doesnt work with neither Bun or Node

matteobruni commented 7 months ago

Can you share more details about installed packages?

FlipFloop commented 4 months ago
  "scripts": {
    "dev": "astro dev",
    "start": "astro dev",
    "build": "astro build",
    "preview": "astro preview",
    "astro": "astro",
  },
  "dependencies": {
    "astro": "^4.7.1",
    "astro-font": "^0.0.71",
    "astro-icon": "^1.1.0",
    "astro-particles": "^2.10.0",
    "tsparticles": "^3.3.0",
    "tsparticles-engine": "^2.12.0"
  },
  "devDependencies": {
    "typescript": "^5.4.5"
  },
}
FlipFloop commented 4 months ago

Property 'particlesInit' does not exist on type 'Window & typeof globalThis'.ts(2339) Type 'Engine' is missing the following properties from type 'Engine': effectDrawers, interactors, movers, pathGenerators, and 19 more.ts(2345) Property 'particlesLoaded' does not exist on type 'Window & typeof globalThis'.ts(2339)

matteobruni commented 3 months ago

https://github.com/tsparticles/astro/issues/22#issuecomment-2002506209 Same problem as here