npm ERR! { Error: EPERM: operation not permitted, mkdir

created at 09-02-2021 views: 368

description

Recently, I encountered the following problems when I was learning about building a blog tutorial online:
An error occurred when installing hexo when using the following command

npm install -g hexo-cli

error:

npm ERR! {Error: EPERM: operation not permitted, mkdir...

After google to find the reason, my problem was finally solved:

Method 1

use the administrator command

Find powerShell/cmd in the desktop search bar, right click and choose to run as an administrator, and then use the cd command to go to the folder where you need to perform npm install and run it again to solve the problem.

Method 2

Under the file you need to operate, right-click on the properties, in the security column, change the user's authority to full control, allow, and it can be solved

created at:09-02-2021
edited at: 09-02-2021: