Search code examples
webdriver-io

EBUSY: resource busy or locked, rmdir


I'm trying webdriverIO recently and got stuck at generating configuration file.

? 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

Above is my configuration and I got following error:

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\Desktop\111\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.

I have tried close all windows and disable firewall and antivirus but still no working, I might need a little help here and thanks in advance.


Solution

  • I guess I ran 'wbio config' under '.bin' folder causes EBUSY.

    Use node_modules\.bin\wdio config under '111' folder resolved the issue.