Error: EPERM: operation not permitted, mkdir ‘D:\node-v16.14.0\node_modules\yarn‘ npm ERR! [Error:

When git pulled the project today, this problem occurred. Please add a picture description
At the beginning, the query said that the versions of node and npm were inconsistent.
Then I checked and found that it was indeed inconsistent.
The specific query method is
https://nodejs.org/zh-cn/download/ The releases/
Please add a picture description
versions are inconsistent.
Uninstalled and reinstalled
https://www.jianshu.com/p/e3f550091bd1

[In the Windows environment]
Step1: Find the C drive, the Roaming directory under AppData under the admin user (it may be your own user name, for example, mine is C:\Users\18539\AppData\Roaming) Step2: Delete the above
directory npm and npm-cache folder
Step3: Go to the node official website to download the latest installation package https://nodejs.org/en/download/, and then reinstall it
##: Finally, confirm whether the installation is successful and open the command line , enter npm -v to see if the version number can be displayed correctly

Search with everything

Re-open npm can
Please add a picture description
still not work
Please add a picture description

You can change this method
(other people's blog)
https://blog.csdn.net/ling08140814/article/details/117002170

Specific operation
insert image description here
Finally, I downloaded npm -v and couldn’t find it. Alas,
insert image description here
I used yarn, and npm ignored him for the time being
. After the git clone link, use yarn to install yarn

The steps to add npx in front
are:

安装全局
npx npm i -g yarn
yarn下载依赖
yarn install
yarn运行项目
yarn run serve

Please add a picture description
Related links
https://blog.csdn.net/yuxisanno139/article/details/117983491

Guess you like

Origin blog.csdn.net/weixin_45090657/article/details/129288427