yarn fail installing protractor and webdriver on windows

Created on 2 Dec 2016  ·  12Comments  ·  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?

It's a bug.

What is the current behavior?

  • using yarn 0.17.10 on Windows 10
  • Create package.json like that:
{
  "name": "webdriver-test",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "protractor": "^4.0.11",
    "webdriver-manager": "^10.2.9"
  }
}
  • yarn install
  • install fails with the following error
Arguments: 
  C:\nodejs\node.exe C:\Users\tomasz\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js install

PATH: 
  C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\TOOLS\sencha5\Sencha\Cmd\5.1.0.26;C:\TOOLS\JDK\jdk1.8.0_102\bin;C:\TOOLS\maven\apache-maven-3.3.9\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\GitExtensions\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\nodejs\;C:\Program Files (x86)\FilExile;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files\OpenVPN\bin;C:\Ruby23\bin;C:\Users\tomasz\AppData\Local\Microsoft\WindowsApps;C:\Users\tomasz\AppData\Roaming\npm;C:\Program Files\MongoDB\Server\3.2\bin;C:\Program Files\MySQL\MySQL Server 5.7\bin;

Yarn version: 
  0.17.10

Node version: 
  6.4.0

Platform: 
  win32 x64

npm manifest: 
  {
    "name": "webdriver-test",
    "version": "1.0.0",
    "main": "index.js",
    "license": "MIT",
    "devDependencies": {
      "protractor": "^4.0.11",
      "webdriver-manager": "^10.2.9"
    }
  }

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile

Trace: 
  Error: ENOENT: no such file or directory, chmod 'C:\DEV\webdriver-test\node_modules\.bin\webdriver-manager'
      at Error (native)
  • remove yarn.lock and node_modules from your directory
  • run yarn install
  • now yarn install works
C:\DEV\webdriver-test>yarn install
yarn install v0.17.10
info No lockfile found.
[1/4] Resolving packages...
warning protractor > jasmine > glob > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 7.60s.
  • if yarn install fails remove again yarn.lock and node_modules from your directory and run yarn install

About half of tries fails for me on windows 10
On Linux it works every time

Most helpful comment

This is still an issue for me as npm install allows me to use the webdriver in angular with ng e2e.

OS: OSX El Capitan 10.11.6
Node: v7.6.0
Yarn: v0.21.3
NPM: 4.4.0

However, yarn or yarn install does not seem to find the correct webdriver-manager. I get the following error:

$ ng e2e
** NG Live Development Server is running on http://localhost:49153 **
(node:7982) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Hash: 5e2c96c47c5c8400a1f4
Time: 10390ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 153 kB {4} [initial] [rendered]
chunk    {1} main.bundle.js, main.bundle.js.map (main) 108 kB {3} [initial] [rendered]
chunk    {2} styles.bundle.js, styles.bundle.js.map (styles) 32.3 kB {4} [initial] [rendered]
chunk    {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 4.83 MB [initial] [rendered]
chunk    {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
webpack: Compiled successfully.
Cannot find module 'protractor/node_modules/webdriver-manager/built/lib/cmds/update' from '$PROJECT_DIR'
Error: Cannot find module 'protractor/node_modules/webdriver-manager/built/lib/cmds/update' from 'PROJECT_DIR'

All 12 comments

Likely a duplicate of #2043.

@kucharzyk, could you try this out on v0.18.0 and let me know if it is still an issue, please?

C:\DEV\webdriver-test>yarn install
yarn install v0.18.0
[1/5] Resolving packages...
success Already up-to-date.
Done in 0.19s.

C:\DEV\webdriver-test>yarn install
yarn install v0.18.0
[1/5] Resolving packages...
success Already up-to-date.
Done in 0.19s.

C:\DEV\webdriver-test>yarn install
yarn install v0.18.0
[1/5] Resolving packages...
success Already up-to-date.
Done in 0.20s.

C:\DEV\webdriver-test>yarn install
yarn install v0.18.0
info No lockfile found.
[1/4] Resolving packages...
warning protractor > jasmine > glob > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "ENOENT: no such file or directory, chmod 'C:\\DEV\\webdriver-test\\node_modules\\.bin\\webdriver-manager'".
info If you think this is a bug, please open a bug report with the information provided in "C:\\DEV\\webdriver-test\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Unfortunately It's still buggy with 0.18.0. It looks like concurrency issue.

Once it's works. Once it's not.

Thanks for testing, @kucharzyk. Seems like it may not be a duplicate then.

I have exactly the same issue with v0.18.0 on Win10 OS

Same issue with 0.18.1 on Win10x64 using node 6.9.2.

Also hitting this on Windows 10x64, version 0.19.1 on node 7.5.0. Running yarn install a second time worked at least.

Actually also seeing it when running yarn add to add a dependency, in this case running the command again doesn't seem to work, unlike yarn install.

Also seeing this error when removing node_modules and running yarn install --production afterwards. If I remove node_modules and yarn install everything goes well. Done on windows 10 and with yarn v0.19.1 version

Are there any updates on this issue? Can you, @kucharzyk, please update the issue title and remove the Windows OS from it? This exact issue can be reproduced on MacOS Sierra.

▶ yarn -v
yarn install v0.20.3
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning gulp > vinyl-fs > glob-stream > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp-protractor > protractor > jasmine > glob > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning browser-sync > localtunnel > request > [email protected]: use uuid module instead
warning cordova > cordova-lib > request > [email protected]: use uuid module instead
warning gulp > vinyl-fs > glob-watcher > gaze > globule > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob > [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
warning cordova > cordova-lib > xcode > [email protected]: use uuid module instead
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "[email protected]" has unmet peer dependency "jasmine-core@*".
[4/4] 📃  Building fresh packages...
success Saved lockfile.
✨  Done in 73.44s.

▶ gulp protractor
[10:00:31] Using gulpfile ~/Projects/@Test/generator-m-ionic-demo/gulpfile.js
[10:00:31] Starting 'clean'...
[10:00:31] Starting 'wiredep'...
[10:00:31] Starting 'environment'...
[10:00:31] Starting 'eslint'...
[10:00:32] Starting 'jsonlint'...
[10:00:32] Starting 'webdriver-update'...
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn /Users/USER/Projects/@Test/generator-m-ionic-demo/node_modules/.bin/webdriver-manager ENOENT
    at exports._errnoException (util.js:1022:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:606:11)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

package.json

▶ cat package.json 
{
  "private": true,
  "engines": {
    "node": ">=4.0.0"
  },
  "scripts": {
    "test": "gulp build --minify && gulp karma"
  },
  "devDependencies": {
    "browser-sync": "^2.8.3",
    "chalk": "^1.1.0",
    "cordova": "^6.0.0",
    "del": "^2.0.0",
    "elementtree": "^0.1.6",
    "eslint": "^3.0.0",
    "gulp": "^3.9.0",
    "gulp-angular-filesort": "^1.1.1",
    "gulp-autoprefixer": "^3.0.1",
    "gulp-changed": "^1.3.0",
    "gulp-csso": "^2.0.0",
    "gulp-eslint": "^3.0.0",
    "gulp-filter": "^4.0.0",
    "gulp-htmlmin": "^2.0.0",
    "gulp-if": "^2.0.0",
    "gulp-imagemin": "^3.0.1",
    "gulp-inject": "^4.0.0",
    "gulp-jsonlint": "^1.1.0",
    "gulp-load-plugins": "^1.0.0-rc",
    "gulp-natural-sort": "^0.1.0",
    "gulp-ng-annotate": "^2.0.0",
    "gulp-plumber": "^1.0.1",
    "gulp-protractor": "^3.0.0",
    "gulp-rename": "^1.2.2",
    "gulp-sass": "^2.0.2",
    "gulp-shell": "^0.5.1",
    "gulp-size": "^2.0.0",
    "gulp-sourcemaps": "^1.5.2",
    "gulp-uglify": "^2.0.0",
    "gulp-useref": "^3.0.4",
    "karma": "^1.1.0",
    "karma-angular-filesort": "^1.0.0",
    "karma-jasmine": "^1.0.2",
    "karma-ng-html2js-preprocessor": "^1.0.0",
    "karma-phantomjs-launcher": "^1.0.0",
    "lodash": "^4.3.0",
    "main-bower-files": "^2.9.0",
    "minimist": "^1.2.0",
    "phantomjs-prebuilt": "^2.1.4",
    "plist": "git://github.com/akofman/plist.js.git#3f256fd21ab3ad3ada0f491cfc905098a2631342",
    "proxy-middleware": "^0.15.0",
    "require-dir": "^0.3.0",
    "vinyl-paths": "^2.0.0",
    "wiredep": "^4.0.0",
    "xml2js": "^0.4.9",
    "yeoman-test": "^1.1.0"
  }
}

This is still an issue for me as npm install allows me to use the webdriver in angular with ng e2e.

OS: OSX El Capitan 10.11.6
Node: v7.6.0
Yarn: v0.21.3
NPM: 4.4.0

However, yarn or yarn install does not seem to find the correct webdriver-manager. I get the following error:

$ ng e2e
** NG Live Development Server is running on http://localhost:49153 **
(node:7982) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Hash: 5e2c96c47c5c8400a1f4
Time: 10390ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 153 kB {4} [initial] [rendered]
chunk    {1} main.bundle.js, main.bundle.js.map (main) 108 kB {3} [initial] [rendered]
chunk    {2} styles.bundle.js, styles.bundle.js.map (styles) 32.3 kB {4} [initial] [rendered]
chunk    {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 4.83 MB [initial] [rendered]
chunk    {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
webpack: Compiled successfully.
Cannot find module 'protractor/node_modules/webdriver-manager/built/lib/cmds/update' from '$PROJECT_DIR'
Error: Cannot find module 'protractor/node_modules/webdriver-manager/built/lib/cmds/update' from 'PROJECT_DIR'

Similar issue still occurs, I have this project: https://github.com/superdyzio/angular-realworld-example-app
with no changes done to the code

I'm trying to run ng e2e and after installing dependencies with yarn I got

 E/launcher - session not created: Chrome version must be between 71 and 75
  (Driver info: chromedriver=2.46.628402 (536cd7adbad73a3783fdc2cab92ab2ba7ec361e1),platform=Windows NT 10.0.17134 x86_64)

after doing rm -rf node_modules && npm i && ng e2e everything works

// yarn version
v1.22.4

// npm version
v6.14.4

// node version
v10.13.0
Was this page helpful?
0 / 5 - 0 ratings