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.

Terminal is not defined

See original GitHub issue

I want to add your terminal in my app so I import the JS like this this <script src="js/xterm.js" type="text/javascript"></script> and it’s imported if I check in the dev terminal.

Then in want to add the terminal like you did in your example:

<div id="terminal"></div>
             <script>
               var term = new Terminal();
               term.open(document.getElementById('#terminal'));
               term.write('Hello from \033[1;3;31mxterm.js\033[0m $ ')
             </script>

But I got the error Terminal is not defined on the line var term = new Terminal();

Details

  • Browser and browser version: Chrome 55.0.2883.95
  • OS version: OS X El Capitan 10.11.6
  • xterm.js version: the one of the 16th January 2017

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Tyriarcommented, Jan 20, 2017

VS Code has it’s own fit logic, no addons used there right now, I imagine loadAddon would work though.

0reactions
pariskcommented, Jan 20, 2017

@JeromeVi does meteor use any kind of “module system” for it’s front-end assets (e.g. RequireJS, Browserify/CommonJS etc.)?

(Please open the browser console, type console.log(require) and send back a screenshot of the result.)

I am pretty sure the issue lies somewhere there, because:

  • The xterm demo uses a plain browser env and loads both xterm and the fit addon without issues
  • SourceLair uses require.js and loads both xterm and the fit addon without issues
  • VS Code uses Node’s require and loads xterm (not sure about fit) and works
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix 'variable is not defined' in node terminal and why is ...
Just restart your terminal and run this: > let bg = 'asasas-123d' > let fd = bg.substring(bg.indexOf("-") + 1)).
Read more >
Uncaught ReferenceError: spyder_terminal is not defined #327
Uncaught ReferenceError: spyder_terminal is not defined . This occurs independent of whether the Terminal external plugin is enabled or ...
Read more >
name 'A' is not defined when running the code in mac terminal ...
When I run the code below in my mac terminal, I get this error: ... File "<string>", line 1, in <module> NameError: name...
Read more >
Losing Replication Updates with "ORA-20016: User's terminal ...
My Oracle Support Banner. Losing Replication Updates with "ORA-20016: User's terminal is not defined." and "ORA-06512: at "SMF. · Applies to:.
Read more >
Troubleshoot Terminal launch failures - Visual Studio Code
This can happen if Windows Subsystem for Linux (WSL) is not set up with a valid default Linux distribution. Note: 'docker-desktop-data' is not...
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