Score:0

can not install vuejs using npm on ubuntu 20.4

cn flag

enter image description here

Error: EACCES: permission denied, open '/home/sabbir/package-lock.json'

I am new on ubuntu I can not install vue js on my ubuntu 20.4 I am having this error.Having this same error installing some other application.Why is this happening? help me out thanks

uz flag
Jos
You may not have write permission on your home directory (which is unlikely) or there may already be a file called `package-lock.json` in your home directory which is read-only. Please run `ls -l ~/package-lock.json` and add the output to your question.
Sabbir Ahmed Shawon avatar
cn flag
sabbir@sabbir-X510UQ:~$ ls -l ~/package-lock.json -rw-r--r-- 1 root root 42249 এপ্রিল 25 23:39 /home/sabbir/package-lock.json this is the output i got
Score:0
uz flag
Jos

You already have a file package-lock.json in your home directory, which is owned by root. You can't remove or replace that file without special permissions. Two thoughts:

  1. To find which files in your home directory are owned by root, do ls -la ~ | grep root. To take back ownership of package-lock.json, do sudo chown myuser:myuser package-lock.json. Replace myuser with your actual user name. Do the same for any other files that ought to be owned by you.

  2. It is not advisable to build web applications directly in your home directory. If you want to build more than one, where should the next one go? Create a folder "webapplications" and within that one, create another folder "my first webapplication" (or whatever) and build your web app there.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.