vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.76k stars 6.33k forks source link

@vue/cli-plugin-e2e-cypress: Uncaught TypeError when visiting Electron project root url #3763

Open thoni56 opened 5 years ago

thoni56 commented 5 years ago

Version

3.5.3

Reproduction link

https://github.com/thoni56/tplayer/tree/7503d54ab615095871cb7b55e788e07380f6cb00

Environment info

Environment Info:

  System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz
  Binaries:
    Node: 11.9.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.17763.1.0
  npmPackages:
    @vue/cli-overlay:  3.5.1
    @vue/cli-plugin-e2e-cypress: ^3.5.1 => 3.5.1
    @vue/cli-plugin-typescript: ^3.5.3 => 3.5.3
    @vue/cli-service: ^3.5.3 => 3.5.3
    @vue/cli-shared-utils:  3.5.1
    @vue/component-compiler-utils:  2.6.0
    @vue/preload-webpack-plugin:  1.1.0
    @vue/web-component-wrapper:  1.2.0
    typescript: ^3.4.2 => 3.4.2
    vue: ^2.6.10 => 2.6.10
    vue-class-component: ^6.0.0 => 6.3.2
    vue-cli-plugin-electron-builder: ^1.2.0 => 1.2.0
    vue-cli-plugin-vuetify: ^0.5.0 => 0.5.0
    vue-hot-reload-api:  2.3.3
    vue-loader:  15.7.0
    vue-property-decorator: ^7.0.0 => 7.3.0
    vue-router: ^3.0.1 => 3.0.2
    vue-save-state: ^1.2.0 => 1.2.0
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
    vuetify: ^1.5.9 => 1.5.9
    vuetify-loader: ^1.0.5 => 1.2.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

Run

npm i
npx vue-cli-service test:e2e

then in the Cypress window start the only test. It will fail with the following error message:

Uncaught TypeError: r.existsSync is not a function

What is expected?

The test should run and pass

What is actually happening?

A failure message is displayed:

Uncaught TypeError: r.existsSync is not a function

grep'ing for 'r.existsSync' in the repo results in the following matching files

node_modules/fork-ts-checker-webpack-plugin/lib/CancellationToken.js
node_modules/fork-ts-checker-webpack-plugin/lib/formatter/codeframeFormatter.js
node_modules/fork-ts-checker-webpack-plugin/lib/IncrementalChecker.js
node_modules/fork-ts-checker-webpack-plugin/lib/index.js
node_modules/fsevents/node_modules/node-pre-gyp/lib/pre-binding.js
node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js

I use the electron remote feature to access local files. Is this related to the problem? Does @vue/cli-plugin-e2e-cypress not support remote? If not, is there anything I can do differently?

Tommytrg commented 4 years ago

Any update on this?. It seems that cypress --browser electron option is ignored.