Iam getting an error while running npm install for react application..error An unexpected error occurred: "EACCES: permission denied, unlink '/home/ats/react-app/myapp/node_modules/@babel/helper-module-imports/LICENSE'".Can someone help me sort this error out?
Asked
Active
Viewed 1.1k times
8
-
Possible duplicate of [Error: EACCES: permission denied](https://stackoverflow.com/questions/38323880/error-eacces-permission-denied) – Aranya Sen Oct 09 '18 at 05:34
-
You need to provide permissions to your root folder. Which OS are you using? – Nagesh Katna Oct 09 '18 at 05:37
-
1iam currently using ubuntu 18.04 – Abdulla Thanseeh Oct 09 '18 at 18:21
3 Answers
21
I had the same problem and I solved it like this:
Remove
node_modulesfolder of your project manually.Then
yarn installornpm install.
סטנלי גרונן
- 2,849
- 23
- 46
- 65
reza makhdomi
- 379
- 2
- 6
1
Execute as sudo if you are using Linux.
Sergio Vasconcelos
- 11
- 1
-
This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/31449041) – pitamer Apr 06 '22 at 07:00
0
Try changing the folder permissions to have the correct ones. If you consider there is no drawback to have the folder with full permissions this command should solve your problem:
sudo chmod -R 777 folderName
Leo
- 532
- 5
- 8