When you tries to install nodejs usng sudo apt install -y nodejs this typically installs nodejs 18 on ubuntu. To upgrade to a newer version of it, you have to curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - And then run sudo apt install -y nodejs And then you have node 22 installed:
While trying to run gemini cli on my windows linux subsystem, i bump into this error here - "/Roaming/npm/node_modules/@google/gemini-cli/node_modules/undici/lib/web/webidl/index.js:512 webidl.is.File = webidl.util.MakeTypeAssertion(File)" "ReferenceError: File is not defined" In Node.js, there’s no built-in File (until very recent Node 20+ with experimental WHATWG APIs). So, unless polyfilled, File is undefined, leading to the ReferenceError. And to resolve this, I had to upgrade to node 22 (might work for node 20) and then I was able to run it.
To install mongosh property on ubuntu 24.04, we need to wget -qO- https://www.mongodb.org/static/pgp/server-8.0.asc | sudo tee /etc/apt/trusted.gpg.d/server-8.0.asc Then run echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list Next we will run sudo apt-get update And then finally install it using sudo apt-get install -y mongodb-mongosh To verify if it is running we run mongosh --version
Comments