TS errors on VS Code: Cannot find namespace 'Phaser'.ts(2503)
See original GitHub issueI’ve just bought the book and tried going through chapter 3, but ran into issues with types not being found almost immediately in phaser-engine.class.ts
. I’ve also tried checking out the chapter/3 branch directly and still encounter the same issue.
There are also some type conflicts in the index.d.ts
file under globals/phaser.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Phaser Definitions for typescript not being read by VSCode
It looks like the example code in the TypeScript tutorial is out of date for Phaser 3. See the current example JavaScript code....
Read more >typescript Code Example - Code Grepper
error TS4111: Property 'name' comes from an index signature, so it must be accessed with ['name']. ... Property 'value' does not exist on...
Read more >Microsoft/TypeScript - Gitter
Mh TS Playground does not complain but VS Code ... error: TypeScript error: app/level-module/module.ts(24,18): Error TS2503: Cannot find namespace 'Rx'.
Read more >VS Code setup with Phaser and TypeScript
When I put some code in a *.ts file, TSLint in VS Code will always say "cannot find name 'Phaser'". I can use...
Read more >cannot find module 'rxjs/observable' or its corresponding type ...
If you upgrade your Typescript version something greater than 4.2.x , you shouldn't face the issue in a real life project. However, the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is also the checkout state of chapter 3 when running npm run start:dev
It’s in the @types dir of a dependency, though, so it may not be a major problem. Here’s the full output:
That fixed everything. Thank you and I look forward to the rest of your book!