Git Product home page Git Product logo

Comments (4)

InklingGirl avatar InklingGirl commented on May 23, 2024 3

@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.

teknetik avatar teknetik commented on May 23, 2024

+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.

InklingGirl avatar InklingGirl commented on May 23, 2024

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.

InklingGirl avatar InklingGirl commented on May 23, 2024

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -

Alternatively, you could more manually set up the repo w/o curling 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.