8

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?

Abdulla Thanseeh
  • 7,242
  • 3
  • 10
  • 16

3 Answers3

21

I had the same problem and I solved it like this:

  • Remove node_modules folder of your project manually.

  • Then yarn install or npm install.

סטנלי גרונן
  • 2,849
  • 23
  • 46
  • 65
reza makhdomi
  • 379
  • 2
  • 6
1

Execute as sudo if you are using Linux.

  • 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