Skip to content

Uncaught ReferenceError: DEBUG is not defined | Stage.js 0.9.4 + Vue.js v3.3.4 #63

Description

@LuckyFox31

Stage.js version : 0.9.4
Vue.js version 3.3.4
Development environment : Vite
Package manager : PNPM 8.6.9

I created a small project with the Vue.js framework to test the Stage.js library.

When I try to import the library I get an error:

Uncaught ReferenceError: DEBUG is not defined
    at node_modules/.pnpm/stage-js@0.9.4/node_modules/stage-js/lib/core.js (core.js:2:3)
    at __require (chunk-76J2PTFD.js?v=a126181c:3:50)
    at node_modules/.pnpm/stage-js@0.9.4/node_modules/stage-js/lib/index.js (index.js:1:18)
    at __require (chunk-76J2PTFD.js?v=a126181c:3:50)
    at node_modules/.pnpm/stage-js@0.9.4/node_modules/stage-js/platform/web.js (web.js:1:18)
    at __require (chunk-76J2PTFD.js?v=a126181c:3:50)
    at web.js:16:1

This error appears in this import:

import {Stage} from "stage-js/platform/web.js"

I also tried this import:

import {Stage} from "stage-js"

Here is my code :

<script setup>
  // -- Dependencies --
  import {ref, onMounted} from "vue";
  import {Stage} from "stage-js/platform/web.js" // <-- Here

  // -- References --
  const gameContainer = ref(null);

  // -- Variables --
  let stage;

  // -- Life cycles --
  onMounted(() => {
    stage = new Stage(gameContainer.value);
  })
</script>

<template>
  <div ref="gameContainer"></div>
</template>

<style scoped>
  div{
    width: 1000px;
    height: 1000px;
  }
</style>

Has anyone ever encountered this error?
How can I solve this problem?

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