issue installing netlify-cli with resulting EACCES permission denied error

For some reason when installing the netlify-cli I ran into an EACCES denied error. I’ve tried the sudo code as well with no luck. It also tells me to replace my directory from ‘/usr/local/lib/node_modules/netlify-cli’ —-> ‘/usr/local/lib/node_modules/.netlify-cli-IjWiS7ZL'. I’ve never have been able to install complete so I don’t know how there a netlify file. My goal is to be able to install stripe after this. If someone has any insight on this issue please let me know. Thank you
12 Replies
Jochem
Jochem2y ago
the ENOTEMPTY error means that you're trying to install something but there's already something there, maybe from a previous project or a failed earlier attempt the solution is to go to /usr/local/lib/node_modules/ and rename the netlify-cli folder to .netlify-cli-IjWiS7ZL, like it suggests
roycwilliams
roycwilliams2y ago
@jochemm correct, i've tried using mv /usr/local/lib/node_modules/netlify-cli’ /usr/local/lib/node_modules/.netlify-cli-IjWiS7ZL but it says my permission is denied
Jochem
Jochem2y ago
you've got an extra ' in there at the end of the first folder name , but you'll have to use sudo to run that probably
roycwilliams
roycwilliams2y ago
Sorry without the ' it still says my premission is denied
Jochem
Jochem2y ago
and with sudo in front of it?
roycwilliams
roycwilliams2y ago
Yes it's weird because i've never used netlify in the terminal
Jochem
Jochem2y ago
try sudo npm uninstall netlify-cli -g
roycwilliams
roycwilliams2y ago
Same result
roycwilliams
roycwilliams2y ago
@jochemm
Jochem
Jochem2y ago
hm, then I'm fresh out of ideas. Sudo should let you do whatever you want to that folder... you could try renaming it to something different maybe?
roycwilliams
roycwilliams2y ago
Do you know of a way I can directly delete the files? Wait I think it’s working lol @jochemm hey so I got it to work. I have stripe integrated on a website but it’s sending a response “bad request, missing form” before I installed netlify into my terminal. Do you think it’ll work now?
Jochem
Jochem2y ago
i have no clue, I've never used either try it and if it doesn't work, open a new thread
Want results from more Discord servers?
Add your server