Dredd is a useful sounding tool that one of my colleagues mentioned to me at work. I thought I would play around with a little to better understand where it lies in the software development toolkit.
The first problem I faced was in installing dredd on Ubuntu 14.04. It turned out to be the classic node vs nodejs naming conflict.
The documentation suggested I attempt to install dredd via the command below
sudo npm install -g dredd
That resulted in a lot of verbose and silly level output. Eventually npm spat out the following:
npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /vagrant/code/npm-debug.log npm ERR! not ok code 0
I also noticed a lot of lines similiar to the following:
npm Error: ENOENT, lstat '/usr/local/lib/node_modules/dredd/node_modules/html/img/copyashtml'
A few google searches later I came across this issue on github titled ‘Installation troubles’. A comment about node reminded me to try
sudo ln -s /usr/bin/nodejs /usr/local/bin/node
The installation now completed succesfully:
$ dredd --version dredd v1.0.2