question
The root cause of the problem:
Inconsistent yarn installation and cache directories cause
View the directory for the yarn command:
yarn global bin
yarn global dir
How to solve
Modify yarn's global installation location and cache location:
yarn config set global-folder "D:\nodejs\node_global"
yarn config set cache-folder "D:\nodejs\node_cache"