安装执行npm install -g @vue/cli失败

问题遇到的现象和发生背景

请问一下我输入npm install -g @vue/cli出现这种问题是什么情况啊??

问题相关代码,请勿粘贴截图

npm install -g @vue/cli
试了好多方法都不行

运行结果及报错内容

执行这条 npm audit fix --force之后也还是不行 出现下面这种错误

C:\Users\ASUS>npm audit fix --force
npm WARN using --force Recommended protections disabled.
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ASUS\AppData\Local\npm-cache\_logs\2022-06-09T03_28_42_648Z-debug-0.log

img

怎么解决的?我也是这样

以管理员身份运行CMD,在进行尝试