错误:EBUSY:资源繁忙或锁定,rmdir [英] Error: EBUSY: resource busy or locked, rmdir
问题描述
在windows中执行以下步骤后出现错误:
The error occurs after following steps in windows:
- 打开一个终端:
npm run start:dev
- 打开另一个终端:
ng build --watch
但是,它可以通过使用上述命令在 Mac 中运行.package.json 配置的一部分是:
However, it works in Mac by using the above commands. Part of the package.json configuration are:
"scripts": {
"ng": "ng",
"start:dev:prod": "ng build --prod && cd dist/ && node static/server.js",
"start": "node static/server.js",
"build:prod": "ng build --prod",
"test": "ng test --code-coverage",
"lint": "ng lint",
"e2e": "ng e2e",
"start:dev": "npm run build & cd dist/ & SET APP_ENV=dev & node static/server.js",
"build": "ng build"
},
错误日志:
Error: EBUSY: resource busy or locked, rmdir 'C:\AngularProject\dist'
Error: EBUSY: resource busy or locked, rmdir 'C:\Spring-Intern-Projects\wdpr-accounting-reference-client\dist'
at Object.rmdirSync (fs.js:701:3)
推荐答案
如果以上所有解决方案都不起作用,并且您像我一样使用 Windows PC,最简单的方法是:
If all the above solutions did not work AND you are using windows PC like in my case, the easiest thing to do is:
按windows键和键盘上的R打开运行命令框并输入这个
Press windows key plus R on your keyboard to open the run command box and type this
resmon.exe
resmon.exe
点击确定打开资源监视器
现在,继续您尝试对文件或文件夹执行的操作.就我而言,我在使用 react-create-app 通过 npm 时遇到问题.更多信息请点击此处#117908
Now, continue what you were trying to do on the file or folder. In my case i was having problems using react-create-app via npm. More information here #117908
我只是希望它对某人有所帮助.
I just hope it helps someone.
这篇关于错误:EBUSY:资源繁忙或锁定,rmdir的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!