I've got a script that automatically installs some npm packages (specifically karma, which I'd like to install with --global
) on an EC2 instance on startup. The problem is that npm sometimes randomly fails, presumably due to network hiccups, though I'm not entirely sure what's going on.
To rule out the network, what I'd like to do is download the relevant files for npm and ask it to install karma based on the files as I download them from S3.
But how do I do that? How do I tell npm not to grab files from the central repository and to instead grab them from somewhere else?