I'm creating a mutiplex terminal on NodeJs, for rendering data to StdOut i'm using terminal.js, but it is a little bit glitchie, so I decide to use xterm.js how has a begger community working on it.
But when i try to import xterm.js right on NodeJs, this error accurs:
/home/.../node_modules/xterm/lib/webpack:/xterm/webpack/universalModuleDefinition:10
})(self, function() {
^
ReferenceError: self is not defined
at Object.<anonymous> (/home/.../node_modules/xterm/lib/webpack:/xterm/webpack/universalModuleDefinition:10:4)
at Module._compile (node:internal/modules/cjs/loader:1092:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
at Module.load (node:internal/modules/cjs/loader:972:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Module.require (node:internal/modules/cjs/loader:996:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (/home/.../src/main.ts:1:1)
at Module._compile (node:internal/modules/cjs/loader:1092:14)
at Module.m._compile (/home/.../node_modules/ts-node/src/index.ts:1056:23)
So, It is a away to use Xterm.Js on server side (nodejs)?