Home > Article > Web Front-end > How to Fix 'EPERM: operation not permitted' Error When Using npm on Windows?
Solving "EPERM: operation not permitted" Error on Windows with npm
When attempting to execute npm commands in a Windows environment, users may encounter the following error:
Error: EPERM: operation not permitted, mkdir 'C:\Program Files (x86)\Git\local'
This issue arises after running the following command:
npm config set prefix /usr/local
The problem lies in setting the prefix path to /usr/local, which is not valid for Windows. This action modifies the prefix variable in the directory C:Program Files (x86)Gitlocal.
To resolve this issue, follow these steps:
Once these changes are made, you should be able to execute npm commands successfully in a regular console.
The above is the detailed content of How to Fix 'EPERM: operation not permitted' Error When Using npm on Windows?. For more information, please follow other related articles on the PHP Chinese website!