Error with typescript +

im getting this error on the console web browser:
ReferenceError: module is not defined
this is my code

import * as socketio from ''

this.socket = socketio.connect('http://localhost:3000');
this.socket.on('connect', (socket) => {

im getting this errors too
rollup v1.29.0
bundles ./src/game.ts → dist\game.js…
(!) Unresolved dependencies (imported by src\scenes\menu.ts)
(!) Missing global variable name
Use output.globals to specify browser global variable names corresponding to external modules (guessing ‘socketio’)
created dist\game.js in 5.4s

//  We need to convert the Phaser 3 CJS modules into a format Rollup can use:
    include: [
    exclude: [ 
   sourceMap: true,
    ignoreGlobal: true

the unresolved dependecies should be solved with?


i dont know why dont let me import like this:

import io from ''

im getting this error:
Module ‘“”’ can only be default-imported using the ‘esModuleInterop’ flagts(1259)

index.d.ts(9, 5): This module is declared with using ‘export =’, and can only be used with a default import when using the ‘esModuleInterop’ flag.

How should i import the module?

Someone know wich is the problem? some hint? is the rollup the problem?

Have you tried using webpack?
Try my template Phaser 3 - Starter Templates with ES6+ (ESNext) or TypeScript

Not really a helpful answer, but this seems like it might get a better response on a Rollup support forum rather than the Phaser one /shrug