-
-
Notifications
You must be signed in to change notification settings - Fork 197
EPERM error with .local/share directory after installing CLI #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I assume the reason for this is as follows:
A simple workaround would be to delay the question and configuration file creation until the first run of tns, which then is performed with the correct user account. |
Make a note on the docs about this issue for linux users; http://docs.nativescript.org/angular/tutorial/ng-chapter-1 |
Hey guys, @Makiavelo @everflux We now have a fix for that in our @next, so if you're still encountering it you can try the latest bits and share if it works for you. |
sudo chown -R ~/.local |
I have similar issue
|
Problem
In case on Mac and Linux I do not have ~/.local directory, after installing CLI with sudo
sudo npm i -g nativescript
, I cannot access ~/.local and ~/.local/share directories. Some other applications are trying to use them after that and they are failing as the directories are created with root owner instead of my own user.Implementation details
The reason is that we are creating .nativescript-cli cache directory insider ~/.local/share and if the path above does not exist, installing CLI with sudo leads to creation of ~/.local and ~/.local/share directories with root owner. Inside CLI we have code to change the owner of .nativescript-cli directory to current user, but it is not applied to ~/.local and ~/.local/share directories which may have been created from the same process.
Workaround
The workaround is to change the owner of ~/.local and all its subdirectories to your user.
sudo chown -R <username> ~/.local
The text was updated successfully, but these errors were encountered: