_From @sturcpavel on August 17, 2015 17:18_
After installing tns and other dependencies, I've tried to create a new project by a simply writing:
tns create new-project
but after a while, error occured:
EACCES, open '/home/pavel/.local/share/.nativescript-cli/.lock'
I fixed it by chown:
sudo chown -R $(whoami) $HOME/.local/share/.nativescript-cli
_Copied from original issue: NativeScript/NativeScript#602_
Hello @sturcpavel,
What is your OS? Have you previously installed NativeScript or Telerik AppBuilder CLI?
Also, how have you installed node and npm? Was it from the official site, or in some other way (like package distribution or homebrew)?
We used to have a bug which erroneously created files with root permissions, maybe it is a regression or we missed something in the original bug fix.
Hi @teobugslayer,
I have Ubuntu 14.04 with last updates, I haven't installed NS or Telerik AppBuilder CLI before.
I installed nodejs via package manager (according to these instructions):
https://github.com/joyent/node/wiki/installing-node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions
I hope this will help.
Hi @sturcpavel ,
Thank you for the additional information. It looks like you have the same issue as this one. You can track the progress of the issue there, so I'm closing this thread. Feel free to contact us in case you have any problems or concerns.
so which one the solution? I have same problem? I use ubuntu 14.04
This worked for me: sudo chown -R $(whoami) $HOME/.local/share/.nativescript-cli
Hi sturcpavel
what is mean (whoami) I tried to sudo chown -R $(myusername) $HOME/.local/share/.nativescript-cli
dyo@dyo-NEON-CNW:~/nativeScript$ sudo chown -R $(dyo@dyo) $HOME/.local/share/.nativescript-cli
dyo@dyo: command not found
chown: missing operand after ‘/home/dyo/.local/share/.nativescript-cli’
Try 'chown --help' for more information.
instead i also try this:
dyo@dyo-NEON-CNW:~$ sudo chown -R $Dyo $HOME /.local/share/.nativescript-cli
chown: invalid user: ‘/home/dyo’
dyo@dyo-NEON-CNW:~$
i don't have idea what happened?
at last i did it! I am going this sudo chown -R dyo ~/.local/share/.nativescript-cli
thanks all guys :)
FYI: whoami prints your username belonging to your actual effective UID, so command mentioned above is a "general" solution.
I needed the same fix in latest-of-everything Ubuntu 18.04, that is one mysterious regression!
Most helpful comment
This worked for me:
sudo chown -R $(whoami) $HOME/.local/share/.nativescript-cli