It looks like you don't have permissions to write to that directory. I would firstly check if you have permissions to write the directory:
ls -la /home/antoni/local
If you do have the right permission you should see something like drwxr-xr-x
and your username. The key being the w
character in the third column. If for some reason the directory doesn't have drwxr-xr-x
then chmod
it to add write permissions:
chmod -R 755 /home/antoni/local
Or if the current owner is wrong then try running:
chown -R $USER /home/antoni/local
You may need to use sudo
for these. After that check you can write to it by running:
touch /home/antoni/local/test.txt
If that fails then there is still a problem with the permissions (perhaps previous commands failed). If that works and it still doesn't install then have a look at where npm is trying to write to:
npm bin -g
npm root -g
These 2 directories are where npm will install the components of grunt-cli. It's worth checking to make sure these 2 directories are writable by you to also.