The operation was rejected by your operating system.
问题
npm install报错:
The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
解决
- 查看是否有程序占用项目文件夹,比如:
- git bash打开了项目
- github desktop打开了项目
- 另外的cmd窗口打开了此文件夹/项目文件夹
- 开启了本地服务器/vscode等编辑器软件打开了项目
- 在项目中已管理员身份运行cmd(如何以管理员身份运行cmd)