yarn ---- Error: EPERM: operation not permitted

1. Error reporting

Error: EPERM: operation not permitted, scandir 'F:\t-plan-mag-ui\mag-ui\build

2. Error reporting scene

When using the npm dependency package rimraf to delete the compiled files, an error occurs! ! !

3. Cause of the problem

The main reason is that opening a powershell window in a folder does not have permission to operate.

4. Solutions

4.1 Solution 1

Enter a picture description

Run with administrative privileges! ! !

4.2 Solution 2

  1. Windows+R key, open [Run];
    Enter a picture description

  2. Enter【gpedit.msc】;
    Enter a picture description

  3. Open Group Policy;
    Enter a picture description

  4. Computer Configuration --> Windows Settings --> Security Settings --> Local Policies --> Security Options
    Enter a picture description

  5. User Account Control - Approve to run all administrators in administrator mode
    Enter a picture description

  6. Disabled --> OK
    Enter a picture description

  7. Reopen the command window to execute the command, and no error will be reported.

Guess you like

Origin blog.csdn.net/m0_38082783/article/details/131855882