Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Error when loadFull method called with the engine #33

@mreyeswilson

Description

@mreyeswilson

I am trying to implement particles in an astro project using the same example that is in the docs, but when it runs throw the next error:

tsparticles.js?v=8d7410be:6671 Uncaught (in promise) TypeError: engine.checkVersion is not a function at loadFull (tsparticles.js?v=8d7410be:6671:10) at window.particlesInit (about.astro:31:15) at Particles.astro?v=8d7410be&astro&type=script&index=0&lang.ts:9:17 at new AstroParticles (Particles.astro?v=8d7410be&astro&type=script&index=0&lang.ts:24:7) at Particles.astro?v=8d7410be&astro&type=script&index=0&lang.ts:27:16 loadFull @ tsparticles.js?v=8d7410be:6671 window.particlesInit @ about.astro:31 (anonymous) @ Particles.astro?v=8d7410be&astro&type=script&index=0&lang.ts:9 AstroParticles @ Particles.astro?v=8d7410be&astro&type=script&index=0&lang.ts:24 (anonymous) @ Particles.astro?v=8d7410be&astro&type=script&index=0&lang.ts:27

this is my code (exactly the same in the docs):

---
import Particles from "astro-particles"
import type { ISourceOptions } from "tsparticles-engine"

const options: ISourceOptions = {
    background: {
        color: "#000"
    },
    fullScreen: {
        zIndex: -1
    },
    particles: {
        number: {
            value: 100
        },
        move: {
            enable: true
        }
    }
};


---

<script>
    import { type Container, type Engine, tsParticles } from "tsparticles-engine";
    import { loadFull } from "tsparticles";

    // the function name is the parameter passed to the init attribute
    // required
    // add the function to window is mandatory, it will be searched there
    window.particlesInit = async function (engine: Engine) {
        await loadFull(engine);
    }
    
    // the function name is the parameter passed to the loaded attribute
    // optional
    // add the function to window is mandatory, it will be searched there
    window.particlesLoaded = function (container: Container) {
        console.log("particlesLoaded callback");
    }
</script>

<Particles id="tsparticles" options={options} init="particlesInit" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions