Missing import in Main.js (Vite)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript, vite
- Domain
- build-system, cli
Research direction
Reproduce the generated project from npm create @phaserjs/game@latest and inspect its Main.js entry point. Open the local app at http://localhost:8080 and verify that the Phaser is not defined error no longer appears in the browser console.
Written by the indexing model from the issue text.
Description
I created a project template using the command:
npm create @phaserjs/game@latest
When opening http://localhost:8080 in the browser, I get the error:
Uncaught ReferenceError: Phaser is not defined at main.js:18:15
Adding this line to Main.js solves the problem:
import * as Phaser from 'phaser';
I'm using create_game version 1.2.3
- Dominant language
- JavaScript
- Stars
- 72
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phaserjs/create-game
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
phaserjs/create-game#8 ·
All issues in phaserjs/create-game
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·