Please check your agent type and version and read on or switch to the right documentation.
Prevent permission errors at installation
Depending on how you've installed Node.js on your system, you could encounter a permissions error EACCES similar to the following output.
In this case, I got the error on a EC2 instance running on Ubuntu 10.04 with Node v8.10.0 and NPM v.3.5.2. But you can have this similar problem on another system and node version.
The problem is because NPM does not have the write access to the directory that will contain the package you want to install (here lumber-cli).
To solve this issue, we recommend to override the default directory where your global NPM packages will be stored.
mkdir~/.npm-global
Then, configure NPM to use this directory instead of the default one:
npmconfigsetprefix'~/.npm-global'
Then, make the node executables accessible from your PATH. To do so, export the environment variable PATH by opening or creating the file ~/.profile and add this line at the end:
~/.profile
export PATH=~/.npm-global/bin:$PATH
Finally, reload the ~/.profile file:
source~/.profile
That's it, now you should be able to install lumber without any error 🎉