How do I fix the error: "[typescript] Cannot find module 'Player.mjs'."?

Tell us what’s happening:
Hi all

I am getting these similar errors in the same file. I believe they are related as they all involve the word ‘typescript’:

"[typescript] Cannot find module 'Player.mjs'."
"[typescript] Property 'getContext' does not exist on type 'HTMLElement'."
"[typescript] Cannot find name 'Phaser'."

Your code so far
https://replit.com/@jaimeggb/secure-real-time-multiplayer-game#public/game.mjs

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36

Challenge: Secure Real Time Multiplayer Game

Link to the challenge:

Not sure but I think you need to

import Player from './Player.mjs';

instead of

import Player from 'Player.mjs';

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.