hubot adapter install permission problem

October 12, 2016 1.3k views

When i get to the step of sudo yo hubot --owner="OWNER <>" --name="bot" --description="Bot" --adapter="rocketchat@0.1" , PuTTY gave me error saying i don’t have permission to some npm file, I researched online, looks like it is a common problem. So i used
Option 1 to change the permission

and this is what i got from PuTTY, I get the feel this is the right direction, but detail is wrong, can anyone tell me what went wrong?

jy@ubuntu-1gb-sfo2-01:~$ npm config get prefix
jy@ubuntu-1gb-sfo2-01:~$ sudo chown -R $jy /usr/local/lib/node_modules/
[sudo] password for jy:
chown: missing operand after ‘/usr/local/lib/node_modules/’
Try 'chown --help' for more information.
1 Answer

In the page you linked a recommendation is given to chown the contents of the directory you are wanting to work with. In the example it included:

 sudo chown -R $(whoami)

In this instance $(whoami) will be automatically replaced by the username you are using. If your username is jk then you could use:

sudo chown -R jy /usr/local/lib/node_modules/

Without the $.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!