EPERM: operation not permitted, lstat when running ng build

后端 未结 7 938
予麋鹿
予麋鹿 2021-01-17 19:30

I\'m getting an ERROR when trying to run ng build on my angular 4 app.

EPERM: operation not permitted, lstat \'\'
<         


        
相关标签:
7条回答
  • 2021-01-17 20:03

    I had the same problem.

    As @Mauricio De La Quintana said, the problem is permission.

    In my case (Windows environment), I solved the problem by removing the read-only property from the Repos folder and adding write permission to the Everyone user.

    0 讨论(0)
  • 2021-01-17 20:06

    I think it is a permission problem, when you do ng build you also delete the previous files. I suggest using

    sudo chown -R youruser /pathAngularApp
    
    0 讨论(0)
  • 2021-01-17 20:06

    I saw this problem when running IISNODE...

    Solution: Ensure that AppPool Identify from IIS has read permissions all the way from root of harddrive to website files.

    Full answer is here https://github.com/tjanczuk/iisnode/issues/247

    0 讨论(0)
  • 2021-01-17 20:08

    This has happened in my ASP.NET projects. For me this has happened for one of two reasons.

    1. This can be a permission problem so you need to run Command Prompt as Admin.

      a. Press win to open the start menu. Type in cmd to search for Command Prompt.

      b. Press ctrl + shift + enter to launch Command Prompt as administrator.

    2. This can happen when you build your web project in Visual Studio(or another IDE) and it is currently running.

      a. This is a simple fix click the stop debugging and then try 'ng build' again.

    0 讨论(0)
  • 2021-01-17 20:11

    Error : Error: EPERM: operation not permitted, lstat 'C:\Users\Administrator'

    We encountered this error after the Windows update.

    This Solution worked for me;

    1. Go to C:\Users\Administrator
    2. Rename the file NTUSER.DAT as NTUSER-old.DAT
    0 讨论(0)
  • 2021-01-17 20:14

    I had the same problem, and it was related to what @goku_da_master commented, I had the vueJs application running even when my VsCode stopped, I figured it out from the task manager and fixed it like this:

    • I opened the task manager
    • I searched if Node.js was running
    • Right click on the Node.js process
    • Finish Task
    • "npm run dev" again
    0 讨论(0)
提交回复
热议问题