I created a new scene named Lobby.scene and it generate a new typescript file which is Lobby.ts but in Lobby.ts file it showing some errors like : Cannot find name ‘Phaser’ .
Other scenes are working fine . If anyone knows a solution please help .
This is a known issue with the Editor. To resolve the issue, you will need to reload the project by either going to View → Reload or View → Force Reload.
opened 01:29AM - 18 Sep 25 UTC
## Version
* Phaser Editor Version: 4.11.2
* Operating System: macOS Sequoia … 15.3
* Web Browser and version: Chrome 134.0.6998.166
## Description
In a TypeScript project, if you create a brand new Scene or Prefab file, and then open the related `.ts` file, there is an uncaught error being reported in the developer console. This error results in the Intellisense not working properly in these files.
Example of intellisense error in the `.ts` files when opened in the Editor:
<img width="710" height="460" alt="Image" src="https://github.com/user-attachments/assets/fec3f1f4-e676-48ba-b337-a10ebf6f06f0" />
<img width="724" height="219" alt="Image" src="https://github.com/user-attachments/assets/d8da3104-213c-4458-90bc-0ac09a97f84c" />
Example of the error shown in the developer console when these files are opened:
<img width="929" height="232" alt="Image" src="https://github.com/user-attachments/assets/1dcf0429-68a4-417f-99b7-8f6e22205acc" />
<img width="649" height="218" alt="Image" src="https://github.com/user-attachments/assets/4b9b0054-e22a-4e83-be81-5b1477d6c51c" />
If you reload the Editor, and try to re-open these files, there error goes away and the intellisense issue no longer occurs.
Steps to reproduce:
1. create a new Phaser Editor project and use the Vite TypeScript project template as a base
2. install the project dependencies when prompted
3. after project is created and loaded, create a new Phaser.Scene file and attempt to open the related `.ts` file
4. you should see the intellisense error and error in the developer console
5. create a new Prefab file and attempt to open the related `.ts` file, and you should see the same error
## Possible solution
For a workaround, you can do View -> Reload, or View -> Force Reload to reload the editor (or use the shortcut), and when you open the `.ts` files, the issue does not occur.
Besides the manual reload, the only other option at this time is to use another editor like VS Code with the tool.