Home > Article > Web Front-end > Why Am I Getting "EPERM: operation not permitted" When Using `npm config set prefix` on Windows?
When executing npm config set prefix /usr/local, you might encounter the error "EPERM: operation not permitted" on Windows OS. This issue arises while attempting to create a directory in the specified path. Deleting files from the C:Users
The root cause of this error is the incorrect path provided for the prefix variable. The path /usr/local is not valid for Windows systems, causing npm to attempt creating the directory at C:Program Files (x86)Gitlocal which requires administrator privileges to modify.
To rectify this issue, follow these steps:
After completing these steps, npm commands should execute as expected in a normal console window.
The above is the detailed content of Why Am I Getting "EPERM: operation not permitted" When Using `npm config set prefix` on Windows?. For more information, please follow other related articles on the PHP Chinese website!