question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Demo Error & No Terminal in WebPage

See original GitHub issue

Details

  • Browser and browser version: Safari 13.0.5
  • OS version: Raspbian Buster
  • xterm.js version: Latest

Steps to reproduce

  1. Clone repo
  2. npm install
  3. create lock file (per npm recommendation to fix vulnerabilities)
  4. sudo node /demo/start.js results in:
App listening to http://127.0.0.1:3000
Hash: d524bfd516e0a9cc5acc
Version: webpack 4.41.6
Time: 10597ms
Built at: 02/22/2020 5:36:54 PM
           Asset      Size  Chunks             Chunk Names
client-bundle.js  60.5 KiB    main  [emitted]  main
Entrypoint main = client-bundle.js
[./client.ts] 13.6 KiB {main} [built] [8 errors]

ERROR in ./client.ts
Module not found: Error: Can't resolve '../addons/xterm-addon-attach/out/AttachAddon' in '/opt/ste
rling/ip-kvm-interface/testing/xterm.js/demo'
 @ ./client.ts 12:22-77


ERROR in ./client.ts
Module not found: Error: Can't resolve '../addons/xterm-addon-fit/out/FitAddon' in '/opt/sterling/
ip-kvm-interface/testing/xterm.js/demo'
 @ ./client.ts 13:19-68

ERROR in ./client.ts
Module not found: Error: Can't resolve '../addons/xterm-addon-search/out/SearchAddon' in '/opt/ste
rling/ip-kvm-interface/testing/xterm.js/demo'
 @ ./client.ts 14:22-77

ERROR in ./client.ts
Module not found: Error: Can't resolve '../addons/xterm-addon-serialize/out/SerializeAddon' in '/o
pt/sterling/ip-kvm-interface/testing/xterm.js/demo'
 @ ./client.ts 15:25-86

ERROR in ./client.ts
Module not found: Error: Can't resolve '../addons/xterm-addon-unicode11/out/Unicode11Addon' in '/o
pt/sterling/ip-kvm-interface/testing/xterm.js/demo'
 @ ./client.ts 18:25-86

ERROR in ./client.ts
Module not found: Error: Can't resolve '../addons/xterm-addon-web-links/out/WebLinksAddon' in '/op
t/sterling/ip-kvm-interface/testing/xterm.js/demo'
 @ ./client.ts 16:24-84

ERROR in ./client.ts
Module not found: Error: Can't resolve '../addons/xterm-addon-webgl/out/WebglAddon' in '/opt/sterl
ing/ip-kvm-interface/testing/xterm.js/demo'

 @ ./client.ts 17:21-74

ERROR in ./client.ts
Module not found: Error: Can't resolve '../out/public/Terminal' in '/opt/sterling/ip-kvm-interface
/testing/xterm.js/demo'
 @ ./client.ts 11:19-52

ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts
./client.ts
[tsl] ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts(11,26)
      TS2307: Cannot find module '../out/public/Terminal'.

ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts
./client.ts
[tsl] ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts(12,29)
      TS2307: Cannot find module '../addons/xterm-addon-attach/out/AttachAddon'.

ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts
./client.ts
[tsl] ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts(13,26)
      TS2307: Cannot find module '../addons/xterm-addon-fit/out/FitAddon'.

ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts
./client.ts
[tsl] ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts(14,45)
      TS2307: Cannot find module '../addons/xterm-addon-search/out/SearchAddon'.

ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts

./client.ts
[tsl] ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts(15,32)
      TS2307: Cannot find module '../addons/xterm-addon-serialize/out/SerializeAddon'.

ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts
./client.ts
[tsl] ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts(16,31)
      TS2307: Cannot find module '../addons/xterm-addon-web-links/out/WebLinksAddon'.

ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts
./client.ts
[tsl] ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts(17,28)
      TS2307: Cannot find module '../addons/xterm-addon-webgl/out/WebglAddon'.

ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts
./client.ts
[tsl] ERROR in /opt/sterling/ip-kvm-interface/testing/xterm.js/demo/client.ts(18,32)
      TS2307: Cannot find module '../addons/xterm-addon-unicode11/out/Unicode11Addon'.

And the following shown from http://127.0.0.1:3000 (accessed remotely from local network ip hence safari browser in safari)

image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
jerchcommented, Feb 23, 2020

@Tyriar For me even npm install does not work with master branch, it complains:

> tsc -b -w ./tsconfig.all.json --preserveWatchOutput

[3:48:24 PM] Starting compilation in watch mode...

node_modules/@types/ws/index.d.ts:44:39 - error TS2694: Namespace '"url"' has no exported member 'URL'.

44     constructor(address: string | url.URL, options?: WebSocket.ClientOptions);

yarn works as expected. Any clue why npm install struggles here? Lock file again?

Edit: With a downgrade to @types/ws@5.1.2 it works again. ~I see that we dont require that ourselves in package.json, so the issue is somewhere in express-ws. Still - why does TS even try to parse/compile anything from ws? Imho we only use ws in the demo in JS code, not TS code? Is our main tsconfig.json too broad?~ Oh well, we have it package.json, any clue why?

Edit2: The issue is the ^6.0.1 rule in package.json, which installs 6.0.4. Seems the types devs have made incompatible interface changes in a bug fix version jump 😞. With explicit installing 6.0.1 it works as well.

0reactions
Tyriarcommented, Oct 18, 2021

Let us know if you still have issues, think this is stale

Read more comments on GitHub >

github_iconTop Results From Across the Web

xterm.js basic demo not working - Stack Overflow
So, I am trying to create a website ...
Read more >
How to create interactive terminal like website with JavaScript?
We will use the JavaScript Terminal library: jQuery Terminal, which gives a simple, but powerful API to create interactive terminals on any website....
Read more >
Simple echo demo for web terminal? · Issue #96 - GitHub
I see the existing demo alludes to a "fake" terminal which displays a prompt and writes keyboard input, but this does not show...
Read more >
Fix JavaScript errors that are reported in the Console
Open the demo webpage Network error reported in Console in a new window or tab. · Right-click anywhere in the webpage and then...
Read more >
Xterm.js
Terminal front-end component written in JavaScript that works in the browser.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found