breautek commented on issue #384:
URL: https://github.com/apache/cordova/issues/384#issuecomment-1505847054

   '/usr/local/lib/`
   
   is generally a path reserved for root, and is what I think is likely the 
source of the permission issue. Cordova is likely have been installed root 
(e.g. `sudo npm install -g cordova`) which isn't recommended, as it means 
cordova will need to be root in order to copy files from node_modules and do 
most of it's operations.
   
   Instead, NPM should be 
[configured](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally#manually-change-npms-default-directory)
 to use a global directory owned by your own user account, so you can use NPM 
to install packages globally without using `sudo`.
   
   Personally, I'd recommend using [nvm](https://github.com/nvm-sh/nvm) (Node 
Version Manager) which installs local versions of a node at a version your 
choice. You could have multiple versions installed and easily switch between 
them, and it configures things in a way by default where you don't need `sudo`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to