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

11,303

Solution 1

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.

Solution 2

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 :)

Solution 3

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

Solution 4

first close the vscode and the bash or cmd runner the project then just remove the ".nuxt" directory form root your project

Solution 5

I am using webstorm, and this problem also happened to me. I closed my terminal, then I closed webstrom and opened my IDE again and npm run dev. It solved my problem and maybe it can solves yours.

Share:
11,303
drake035
Author by

drake035

Updated on June 05, 2022

Comments

  • drake035
    drake035 almost 2 years

    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?