![]() Let’s create a file to put those commands in. When you have finished entering these details, save and quit by pressing esc then entering :x then pressing enter. You will need to replace “username”, “/path/to/npm”, and “/path/to/node” with the details you gathered in section 1. Username ALL = NOPASSWD: /path/to/npm /path/to/node ![]() ![]() This will open the /etc/sudoers file for you (probably in vi/vim) press shift+ g to go to the bottom of the file, then press o to insert a newline and start inserting text, enter the following: # Allow me to use npm and node without password Press enter when you’ve completed entering your password. You will need to enter your password, though you won’t see any typing as you enter it. In Terminal.app, enter the following: sudo visudo Let’s now configure sudo to not require you to use a password for those two commands. What is your username? Find using whoami in Terminal.appĪll of this is important, make a note of the outputs.What is the path to node? Find out using which node in Terminal.app.What is the path to npm? Find out using which npm in Terminal.app.
0 Comments
Leave a Reply. |