Today I tried to install Mirador in a dumb Docker container, partly to make a point to some devs that what I wanted them to do wasn’t very hard. (That is, if I could do it from scratch in a day knowing very little about Mirador, IIIF, NodeJS, and Docker, surely they didn’t need to take the half-week I was quoted. From being a full-time web dev, I know that logic does not hold rigidly, but it’s not too far off.)
My first blocker was a failure of PhantomJS to install. It’s possible my next post will be that I was installing a dev version of Mirador that I didn’t need to install, but we’ll see. In any case, what I think was the material portion of the error spew was
npm ERR! email@example.com install: `node install.js` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the firstname.lastname@example.org install script 'node install.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the phantomjs-prebuilt package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node install.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs phantomjs-prebuilt npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls phantomjs-prebuilt npm ERR! There is likely additional logging output above.
Since my knowledge of all these things is very shallow, it took me longer than it might have to figure out what phrase from that to search on, but eventually I landed upon — natürlich — a Stack Overflow response to a more generic question about installing Node packages on Ubuntu that helped me. Indeed, running
sudo apt-get install nodejs-legacy allowed the
npm install portion of the Mirador process to continue to a successful conclusion.