npm ERR! code EBUSY

发布时间 2023-12-19 18:00:20作者: 陈晓猛

 

 

 

 

错误原因:

文件系统个中的某些文件正在被占用而导致粉

1.关闭所有正在使用该目录或文件的程序 然后再次运行命令

2.如果您正在使用windows操作系统,尝试以管理员身份运行命令提示符或PowerShell

3.重启计算机 然后再次运行命令

PS F:\Project\NetDragon\Portal2.0\portal-functional-tests> npm install junit
npm ERR! code EBUSY
npm ERR! syscall rename
npm ERR! path F:\Project\NetDragon\Portal2.0\portal-functional-tests\node_modules\selenium-standalone\.selenium\selenium-server\4.4.0\selenium-server.jar
npm ERR! dest F:\Project\NetDragon\Portal2.0\portal-functional-tests\node_modules\.selenium-standalone-n7kv4COY\.selenium\selenium-server\4.4.0\selenium-server.jar
npm ERR! errno -4082
npm ERR! EBUSY: resource busy or locked, rename 'F:\Project\NetDragon\Portal2.0\portal-functional-tests\node_modules\selenium-standalone\.selenium\selenium-server\4.4.0\selenium-server.jar' -> 'F:\Project\NetDragon\Portal2.0\portal-functional-tests\node_modules\.selenium-standalone-n7kv4COY\.selenium\selenium-server\4.4.0\selenium-server.jar'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Local\npm-cache\_logs\2023-12-19T09_46_52_168Z-debug-0.log