Cannot install any terminal emulator packages (Ubuntu 20.04)

I’m on Ubuntu 20.04, and I wanted a way to pull up a quick terminal inside the editor. However, when I try to install any of the terminal emulator packages (such as vk-terminal, terminal-tab, x-terminal, terminal-plus, atom-ide-terminal), I get an error exactly like or similar to this:

pty.js@0.3.0 install /tmp/apm-install-dir-120818-37051-ktkmat.2o3ta/node_modules/vk-terminal/node_modules/pty.js
node scripts/install.js

{ Error: Command failed: node-gyp rebuild
Aborted (core dumped)
gyp: Call to ‘node -e “require(‘nan’)”’ returned exit status 134 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 5.4.0-47-generic
gyp ERR! command “/usr/share/atom/resources/app/apm/bin/node” “/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /tmp/apm-install-dir-120818-37051-ktkmat.2o3ta/node_modules/vk-terminal/node_modules/pty.js
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Aborted (core dumped)

And so on for quite a bit more. I have very little experience with Node, and I have no idea what “gyp” is, but all of the terminal packages have some complaints about it.

JS is cross platform by default, which can be limiting for non-browser applications. node-gyp is a tool that lets you use native code (like C++) in JS. It’s also a massive pain when it doesn’t work.

All the terminal emulators I know of use the node-pty library, which itself uses this native code, which is why they all fail.

I don’t know what causes that error either. I think I ran into it once when I had Node installed on the system, e.g., through apt. But why that would be a problem, I have no clue. It didn’t happen when I install Node with nvm (you don’t need Node installed to use Atom though).

I am on Ubuntu 20.04. You can “pull up” or pass arguments to any terminal emulator you choose through a command run in process-palette. For example I pass Atom arguments (through process-palette commands or through python script) to gnome-terminal and yakuake and/or launch other external applications.

1 Like