EBUSY:资源繁忙或锁定,rmdir

EBUSY: resource busy or locked, rmdir

我最近在尝试 webdriverIO,但在生成配置文件时卡住了。

? Where should your tests be launched  local - https://www.npmjs.com/package/@wdio/local-runner
? Shall I install the runner plugin for you? Yes
? Where is your automation backend located? On my local machine
? Which framework do you want to use? mocha
? Shall I install the framework adapter for you? Yes
? Do you want to run WebdriverIO commands synchronous or asynchronous? sync
? Where are your test specs located? ./test/specs/**/*.js
? Which reporter do you want to use?  dot - https://www.npmjs.com/package/@wdio/dot-reporter
? Shall I install the reporter library for you? Yes
? Do you want to add a service to your test setup? (Press <space> to select, <a> to toggle all, <i> to invert selection)
? Level of logging verbosity trace
? What is the base url? http://localhost

以上是我的配置,但出现以下错误:

Installing wdio packages:
- @wdio/local-runner
- @wdio/mocha-framework
- @wdio/dot-reporter
- @wdio/sync
yarn add v1.13.0
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.7: The platform "win32" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @wdio/mocha-framework@5.6.0" has unmet peer dependency "webdriverio@^5.0.0".
error An unexpected error occurred: "EBUSY: resource busy or locked, rmdir 'C:\Users\QualIT-AKL\Desktop\111\node_modules\.bin'".
info If you think this is a bug, please open a bug report with the information provided in "C:\Users\QualIT-AKL\Desktop\111\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
(node:11268) UnhandledPromiseRejectionWarning: Error: null
at _inquirer.default.prompt.then.answers (C:\Users\QualIT-AKL\Desktop1\node_modules\@wdio\cli\build\setup.js:57:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:11268) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11268) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

我已尝试关闭所有 windows 并禁用防火墙和防病毒软件,但仍然无法正常工作,我可能需要一些帮助,在此先感谢。

我想我 运行 'wbio config' 在“.bin”文件夹下导致 EBUSY。

使用“111”文件夹下的 node_modules\.bin\wdio 配置解决了问题。