On running yarn
with a selenium-standalone
dependency, you may encounter this error:
yarn install v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred:
"EPERM: operation not permitted, unlink
'/node_modules/selenium-standalone/.selenium/chromedriver/2.37-x64-chromedriver'".
If this occurs after you've run WebDriver tests, there may be a very simple solution. If the tests used chromedriver
and didn't properly close the instances, then there may still be an active chromedriver
process prohibiting it from being unlinked. Check if this is the case and close the process(es).
If there are no open chromedriver
processes and the error still occurs, check npm -v
. If the version is 5.4 or 5.5, either downgrade to 5.3 (npm i -g npm@5.3
) or upgrade to 5.6+ (npm i -g npm
).