Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'EPERM: operation not permitted' error when building Nuxt app

Tags:

npm

nuxt.js

Getting one of the following intermittant errors when running npm run dev:

EPERM: operation not permitted, mkdir 'D:\projects\my_project\.nuxt\components'

EPERM: operation not permitted, lstat 'D:\projects\my_project\.nuxt

I tried npm cache clear to no avail. Some people attribute this issue to npm install folders shared on some network, not my case.

Note: this is a random issue. I just tried again after a couple hours and now it works. But when creating this question, it never worked no matter how many times I tried.

Any idea?

like image 790
drake035 Avatar asked Jun 04 '19 17:06

drake035


3 Answers

I had the same issue. I believe is related on VS Code.

I closed VS Code and stopped my console.
I rebuild Nuxt with 'npm run dev' and reopen VS Code.
Now is working.

like image 57
novecentonove Avatar answered Sep 16 '22 11:09

novecentonove


To solve this issue is only

Stop dev, Close your CMD and Open CMD again and last you can npm run dev again

Hope this will help you :)

like image 38
Risqi Ardiansyah Avatar answered Sep 18 '22 11:09

Risqi Ardiansyah


Same issue. I'm on windows with VS code. Closed terminal and run again with administrator, then it worked. Permission issue.

like image 22
singuyen Avatar answered Sep 16 '22 11:09

singuyen