Comments (4)
@teknetik I've been able to find a solution on my own, I guess.
Add the official Node.js repo:
curl -sL https://deb.nodesource.com/setup_17.x | sudo -E bash -
Followed by installing the nodejs
meta-package (not npm
) :
sudo apt install nodejs
Followed by installing gtop
w/ superuser permissions specifically:
sudo npm install gtop -g
After that, gtop
seems to work. If a developer/maintainer has any better advice or insight to contribute, we're still waiting to hear it; get around to your users' tickets!
from gtop.
+1
`Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
nodejs --version
v10.19.0
Error:
/usr/local/lib/node_modules/gtop/node_modules/marked-terminal/index.cjs:333
&& Number(osRelease[2]) >= 10_586
^^
SyntaxError: Invalid or unexpected token
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/usr/local/lib/node_modules/gtop/node_modules/blessed-contrib/lib/widget/markdown.js:5:24)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
`
from gtop.
Add the official Node.js repo:
curl -sL https://deb.nodesource.com/setup_17.x | sudo -E bash -
On Ubuntu 22.04, now:
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
from gtop.
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
Alternatively, you could more manually set up the repo w/o curl
ing that shell script, like this:
wget -O- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/nodesource.gpg
echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x jammy main
deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x jammy main' | sudo tee /etc/apt/sources.list.d/nodesource.list
Also, I recently found out you can install gtop
& other Node.js packages w/ yarn
, which is a faster package manager for them:
wget -O- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/nodesource.gpg
echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x jammy main
deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x jammy main' | sudo tee /etc/apt/sources.list.d/nodesource.list
wget -O- https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg
echo 'deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main' | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn
sudo yarn global add gtop
^ This is how I do it now. As shown, in addition to the Yarn repo you still need to add the Node.js repo, that's to get the latest nodejs
package (for gtop
to work at all), which will–unless you've messed w/ apt
's defaults–be installed automatically alongside yarn
as a recommended package.
Again, the maintainer should really update his project's README.md.
from gtop.
Related Issues (20)
- ZSH: Command not found: gtop HOT 1
- Words on *BSD compatibility? HOT 1
- Feature Request: add laptop uptime similar to the uptime in htop
- how to remove all the things that were installed? HOT 1
- support show more cpus (16) in terminal HOT 1
- Apple M1 info is not right HOT 1
- Migrate to Typescript HOT 1
- remainColor == 'black' seems like a bad default for the donuts HOT 2
- Feature: Be able to view historical data HOT 1
- Cannot sort by cpu / mem HOT 5
- 100% CPU usage on Windows 10 HOT 1
- Disk usage is different than what reported by df on the Ubuntu HOT 2
- Error on xterm-256color.plab_norm HOT 2
- RangeError [ERR_INVALID_OPT_VALUE] ... HOT 2
- no man-page entry HOT 1
- Needed
- disk usage in gtop does not change on FreeBSD with ZFS
- Shared memory error.
- [Feature Request] Transparency option
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtop.