Is Ethereum Waffle throwing installation tantrums with Ubuntu?

Recently, I have been spending lots of time with Blockchain, Etheruem, and Smart Contracts. Ubuntu continues to baffle me, it’s AWESOME, secure, and very dependable, however, deploying/configuring things sometimes will take an army to make it happen, especially with Linux’s useless error messages.

In this post, I am sharing a troubleshooting journey that I went through with installing Ethereum Waffle on an Ubuntu development virtual machine. It all started with the following error message

undefined ls-remote -h -t

Check out the screenshot below, as soon as I run

npm install ethereum-waffle

Ethereum Waffle Installation Error

hmm, where to start? Looking thoroughly into the error output, I found this interesting line

This is related to npm not being able to find a file.

From experience, usually, the first thing to start with is making sure that I am running the latest stable build of Node.js. A quick version check with

node -v

shows that I am not running the latest version. Instead of v16, I am running v10. Let’s fix that, so I started first with

sudo apt update” and “sudo apt upgrade

Update & Upgrade Related Packages

Once done with that, let’s make sure we get the latest version of Node.js. A quick search over Google, I landed on a Node Source article that touches base on this. Fast forward, make sure you have CURL installed and run this

curl -fsSL | sudo -E bash

Use CURL to get the latest version from Node.js

As we have the latest binaries now available for installation, go ahead and run

sudo apt install -y nodejs

Installing the latest Node.js binaries

Doing a quick version check, I see we are running the latest build version v16. now let’s try installing Ethereum Waffle again, and crossing my fingers this time it will work. Otherwise, this article will grow longer 😉

Successful installation of Ethereum Waffle

Yes, the installation was completed successfully.! So, the moral of this, if Ethereum Waffle is throwing a tantrum during installation, make sure you are running v16 or higher of Node.js.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.