Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add webpack loader #115

Merged
merged 1 commit into from
Dec 1, 2018
Merged

Conversation

mkusher
Copy link
Contributor

@mkusher mkusher commented Nov 21, 2018

Solution for #114
The only thing that needed is to move compile function from index.js to a separate module.

Example configuration

Sample webpack.config.js may look like this:

module.exports = {
  resolve: {
    extensions: [".ts", ".js"]
  },
  module: {
    rules: [
      {
        test: /\.ts$/,
        exclude: [/node_modules/],
        use: [
          {
            loader: "ts-loader"
          }
        ]
      },
      {
        test: /\.feature$/,
        use: [
          {
            loader: "cypress-cucumber-preprocessor/loader"
          }
        ]
      }
    ]
  }
}

and plugins/index.js need just to include webpack:

const webpack = require("@cypress/webpack-preprocessor")

module.exports = on => {
  const options = {
    webpackOptions: require("../webpack.config.js")
  }
  on("file:preprocessor", webpack(options))
}

@lgandecki
Copy link
Collaborator

lgandecki commented Nov 26, 2018

Wow! This is fantastic.

The thing I'm not sure about though - do we still get the watch functionality when using webpack like this?

Currently I believe we watch both step definition .js and .feature files. Watching only the .feature file would make this much less developer friendly experience. :( I mean - this is not a regression since we currently don't even support this mode.. but I wonder if there is something we can do here.
What do you think @mkusher ?

...I missed the "thank you" part ;-) so - editing to say THANK YOU :)

@mkusher
Copy link
Contributor Author

mkusher commented Nov 26, 2018

webpack handles watch by itself: it will watch anything that was required/imported by any of the files (even .feature file). So since feature directly requires step definitions - they will be watched by webpack and transpiled on change with appropriate loader

@mkusher
Copy link
Contributor Author

mkusher commented Nov 28, 2018

@lgandecki do you have any other questions or concerns about this PR? Would like to get this merged :)

@lgandecki
Copy link
Collaborator

Hey @mkusher I need to test this out, especially since there are no tests (I guess this is a tricky thing to build a test for, unless we do another cypress configuration that uses webpack and do two test runs, which would be a bit cumbersome and slow..) and since you there is no documentation in the PR that's also on my plate. :-) my plan is to get this done over this weekend.

@lgandecki lgandecki merged commit 2e2d64a into badeball:master Dec 1, 2018
@lgandecki
Copy link
Collaborator

🎉 This PR is included in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@zadigus
Copy link

zadigus commented Feb 13, 2019

With what version of webpack is that supposed to work? if I use the example configuration above, with only the cypress cucumber preprocessor rule, then my feature files never get loaded (I get a webpack compilation error). If I use that preprocessor directly in the plugin/index.js as in the workaround solution to this problem (see #114), the feature files are loaded. Any hint on what I am missing here?

@lgandecki
Copy link
Collaborator

It's not supposed to work but it works :) please make a reproduction or at least show us your webpack config (make sure that's the
One used from Cypress plugins) and Cypress plugins config file.
Also, show us the error you get

Thanks

@zadigus
Copy link

zadigus commented Feb 13, 2019

I can be a bit more precise: here's my webpack config:

module.exports = {
  resolve: {
    extensions: ['.js']
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: [/node_modules/],
        use: [{
          loader: 'babel-loader',
          options: {
            presets: ['babel-preset-env']
          }
        }]
      },
      {
        test: /\.graphql$/,
        use: [
          {
            loader: 'graphql-tag/loader'
          }
        ],
        exclude: /(node_modules)/
      },
      {
        test: /\.feature$/,
        use: [
          {
            loader: 'cypress-cucumber-preprocessor/loader'
          }
        ],
        exclude: /(node_modules)/
      }
    ]
  }
}

Here's my plugins.js:

const webpack = require('@cypress/webpack-preprocessor')

module.exports = (on, config) => {
  const options = {
    webpackOptions: require('../webpack.config.js')
  }
  on('file:preprocessor', webpack(options))
}

I get the following errors:

Error: Webpack Compilation Error
    at Function.module.exports [as sync] (D:\webdev\shopozor-management-frontend\node_modules\resolve\lib\sync.js:43:15)
    at resolveStandardizedName (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\files\plugins.js:101:31)
    at resolvePreset (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\files\plugins.js:58:10)
    at loadPreset (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\files\plugins.js:77:20)
    at createDescriptor (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:154:9)
    at items.map (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:109:50)
    at Array.map (native)
    at createDescriptors (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:109:29)
    at createPresetDescriptors (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:101:10)
    at passPerPreset (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:58:96)
    at cachedFunction (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\caching.js:33:19)
    at presets.presets (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:29:84)
    at mergeChainOpts (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-chain.js:315:26)
    at D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-chain.js:278:7
    at buildRootChain (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-chain.js:68:29)
    at loadPrivatePartialConfig (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\partial.js:85:55)
    at loadFullConfig (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\full.js:43:39)
    at process.nextTick (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\transform.js:28:33)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at createDeferred (D:\webdev\shopozor-management-frontend\node_modules\@cypress\webpack-preprocessor\deferred.js:6:22)
    at onCompile (D:\webdev\shopozor-management-frontend\node_modules\@cypress\webpack-preprocessor\index.js:149:22)
    at SyncHook.eval [as call] (eval at create (D:\webdev\shopozor-management-frontend\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:7:1)
    at SyncHook.lazyCompileHook (D:\webdev\shopozor-management-frontend\node_modules\tapable\lib\Hook.js:154:20)
    at hooks.beforeCompile.callAsync.err (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Compiler.js:537:23)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\webdev\shopozor-management-frontend\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (D:\webdev\shopozor-management-frontend\node_modules\tapable\lib\Hook.js:154:20)
    at Compiler.compile (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Compiler.js:534:28)
    at compiler.hooks.watchRun.callAsync.err (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Watching.js:76:18)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\webdev\shopozor-management-frontend\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (D:\webdev\shopozor-management-frontend\node_modules\tapable\lib\Hook.js:154:20)
    at Watching._go (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Watching.js:40:32)
    at Watching.compiler.readRecords.err (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Watching.js:32:9)
    at Compiler.readRecords (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Compiler.js:401:11)
    at new Watching (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Watching.js:29:17)
    at Compiler.watch (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Compiler.js:201:10)
    at D:\webdev\shopozor-management-frontend\node_modules\@cypress\webpack-preprocessor\index.js:170:49
    at Object.file [as handler] (D:\webdev\shopozor-management-frontend\cypress\plugins\index.js:21:51)
    at invoke (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:17:16)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\util.js:48:16
    at Object.wrapChildPromise (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\util.js:47:28)
    at Object.wrap (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\child\preprocessor.js:25:8)
    at execute (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:80:20)
    at EventEmitter.ipc.on (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:136:5)
    at emitThree (events.js:135:13)
    at EventEmitter.emit (events.js:216:7)
    at process.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\util.js:25:29)
    at emitTwo (events.js:125:13)
    at process.emit (events.js:213:7)
    at emit (internal/child_process.js:768:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
From previous event:
    at Object.wrapParentPromise (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\util.js:61:14)
    at Object.file:preprocessor (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\index.js:67:27)
    at Object.execute (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\index.js:115:38)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\preprocessor.js:97:24
From previous event:
    at Object.getFile (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\preprocessor.js:96:63)
    at Object.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:23:27)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\routes.js:40:19
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:137:13)
    at Route.dispatch (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:281:22
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:91:12)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at logger (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\morgan\index.js:112:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at compression (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\compression\index.js:220:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at cookieParser (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\cookie-parser\index.js:56:14)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:113:18
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at expressInit (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\init.js:40:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at query (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\query.js:45:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:174:3)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\application.js:174:10)
    at Server.app (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\express.js:39:9)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\socket\node_modules\engine.io\lib\server.js:435:22)
    at Server._callRequestListeners (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:468:31)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:480:24)
    at emitTwo (events.js:125:13)
    at Server.emit (events.js:213:7)
    at parserOnIncoming (_http_server.js:602:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
?[0mGET /__cypress/tests?p=cypress%5Csupport%5Cindex.js-702 ?[32m200 ?[0m651.495 ms - 145?[0m
Error: Webpack Compilation Error
    at Function.module.exports [as sync] (D:\webdev\shopozor-management-frontend\node_modules\resolve\lib\sync.js:43:15)
    at resolveStandardizedName (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\files\plugins.js:101:31)
    at resolvePreset (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\files\plugins.js:58:10)
    at loadPreset (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\files\plugins.js:77:20)
    at createDescriptor (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:154:9)
    at items.map (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:109:50)
    at Array.map (native)
    at createDescriptors (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:109:29)
    at createPresetDescriptors (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:101:10)
    at passPerPreset (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:58:96)
    at cachedFunction (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\caching.js:33:19)
    at presets.presets (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:29:84)
    at mergeChainOpts (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-chain.js:315:26)
    at D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-chain.js:278:7
    at buildRootChain (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-chain.js:68:29)
    at loadPrivatePartialConfig (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\partial.js:85:55)
    at loadFullConfig (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\full.js:43:39)
    at process.nextTick (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\transform.js:28:33)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.module.exports [as sync] (D:\webdev\shopozor-management-frontend\node_modules\resolve\lib\sync.js:43:15)
    at resolveStandardizedName (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\files\plugins.js:101:31)
    at resolvePreset (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\files\plugins.js:58:10)
    at loadPreset (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\files\plugins.js:77:20)
    at createDescriptor (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:154:9)
    at items.map (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:109:50)
    at Array.map (native)
    at createDescriptors (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:109:29)
    at createPresetDescriptors (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:101:10)
    at passPerPreset (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:58:96)
    at cachedFunction (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\caching.js:33:19)
    at presets.presets (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:29:84)
    at mergeChainOpts (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-chain.js:315:26)
    at D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-chain.js:278:7
    at buildRootChain (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-chain.js:68:29)
    at loadPrivatePartialConfig (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\partial.js:85:55)
    at loadFullConfig (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\full.js:43:39)
    at process.nextTick (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\transform.js:28:33)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.module.exports [as sync] (D:\webdev\shopozor-management-frontend\node_modules\resolve\lib\sync.js:43:15)
    at resolveStandardizedName (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\files\plugins.js:101:31)
    at resolvePreset (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\files\plugins.js:58:10)
    at loadPreset (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\files\plugins.js:77:20)
    at createDescriptor (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:154:9)
    at items.map (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:109:50)
    at Array.map (native)
    at createDescriptors (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:109:29)
    at createPresetDescriptors (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:101:10)
    at passPerPreset (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:58:96)
    at cachedFunction (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\caching.js:33:19)
    at presets.presets (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-descriptors.js:29:84)
    at mergeChainOpts (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-chain.js:315:26)
    at D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-chain.js:278:7
    at buildRootChain (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\config-chain.js:68:29)
    at loadPrivatePartialConfig (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\partial.js:85:55)
    at loadFullConfig (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\config\full.js:43:39)
    at process.nextTick (D:\webdev\shopozor-management-frontend\node_modules\@babel\core\lib\transform.js:28:33)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at createDeferred (D:\webdev\shopozor-management-frontend\node_modules\@cypress\webpack-preprocessor\deferred.js:6:22)
    at onCompile (D:\webdev\shopozor-management-frontend\node_modules\@cypress\webpack-preprocessor\index.js:149:22)
    at SyncHook.eval [as call] (eval at create (D:\webdev\shopozor-management-frontend\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:7:1)
    at SyncHook.lazyCompileHook (D:\webdev\shopozor-management-frontend\node_modules\tapable\lib\Hook.js:154:20)
    at hooks.beforeCompile.callAsync.err (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Compiler.js:537:23)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\webdev\shopozor-management-frontend\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (D:\webdev\shopozor-management-frontend\node_modules\tapable\lib\Hook.js:154:20)
    at Compiler.compile (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Compiler.js:534:28)
    at compiler.hooks.watchRun.callAsync.err (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Watching.js:76:18)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\webdev\shopozor-management-frontend\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (D:\webdev\shopozor-management-frontend\node_modules\tapable\lib\Hook.js:154:20)
    at Watching._go (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Watching.js:40:32)
    at Watching.compiler.readRecords.err (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Watching.js:32:9)
    at Compiler.readRecords (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Compiler.js:401:11)
    at new Watching (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Watching.js:29:17)
    at Compiler.watch (D:\webdev\shopozor-management-frontend\node_modules\webpack\lib\Compiler.js:201:10)
    at D:\webdev\shopozor-management-frontend\node_modules\@cypress\webpack-preprocessor\index.js:170:49
    at Object.file [as handler] (D:\webdev\shopozor-management-frontend\cypress\plugins\index.js:21:51)
    at invoke (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:17:16)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\util.js:48:16
    at Object.wrapChildPromise (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\util.js:47:28)
    at Object.wrap (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\child\preprocessor.js:25:8)
    at execute (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:80:20)
    at EventEmitter.ipc.on (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:136:5)
    at emitThree (events.js:135:13)
    at EventEmitter.emit (events.js:216:7)
    at process.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\util.js:25:29)
    at emitTwo (events.js:125:13)
    at process.emit (events.js:213:7)
    at emit (internal/child_process.js:768:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
From previous event:
    at Object.wrapParentPromise (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\util.js:61:14)
    at Object.file:preprocessor (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\index.js:67:27)
    at Object.execute (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\index.js:115:38)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\preprocessor.js:97:24
From previous event:
    at Object.getFile (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\plugins\preprocessor.js:96:63)
    at Object.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:23:27)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\routes.js:40:19
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:137:13)
    at Route.dispatch (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:281:22
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:91:12)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at logger (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\morgan\index.js:112:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at compression (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\compression\index.js:220:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at cookieParser (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\cookie-parser\index.js:56:14)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:113:18
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at expressInit (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\init.js:40:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at query (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\query.js:45:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:174:3)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\application.js:174:10)
    at Server.app (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\express.js:39:9)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\socket\node_modules\engine.io\lib\server.js:435:22)
    at Server._callRequestListeners (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:468:31)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:480:24)
    at emitTwo (events.js:125:13)
    at Server.emit (events.js:213:7)
    at parserOnIncoming (_http_server.js:602:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)

@zadigus
Copy link

zadigus commented Feb 13, 2019

If I write the following code in my plugins.js

// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

const cucumber = require('cypress-cucumber-preprocessor').default
const webpack = require('@cypress/webpack-preprocessor')

module.exports = (on, config) => {
  const options = {
    webpackOptions: require('../webpack.config.js')
  }
  on('file:preprocessor', file => {
    if (file.filePath.match(/\.(js|graphql|vue)$/)) {
      console.log('webpack: ', file)
      webpack(options)(file)
      console.log('end webpack')
    } else {
      console.log('cucumber: ', file)
      cucumber()(file)
      console.log('end cucumber')
    }
  })
}

then I get the following errors:

cucumber:  EventEmitter {
  domain: null,
  _events: { rerun: [Function] },
  _eventsCount: 1,
  _maxListeners: undefined,
  filePath: 'D:\\webdev\\shopozor-management-frontend\\cypress\\integration\\Authentication\\LogStaffOut.feature',
  outputPath: 'C:\\Users\\mihl\\AppData\\Roaming\\Cypress\\cy\\production\\projects\\shopozor-management-frontend-0eebfd34bbd1c53d2a03b417d2f8dea5\\bundles\\cypress\\integration\\Authentication\\LogStaffOut.feature',
  shouldWatch: true }
?[0mGET /__cypress/iframes/integration/Authentication/LogStaffOut.feature ?[32m200 ?[0m33.925 ms - 765?[0m
end cucumber
webpack:  EventEmitter {
  domain: null,
  _events: { rerun: [Function] },
  _eventsCount: 1,
  _maxListeners: undefined,
  filePath: 'D:\\webdev\\shopozor-management-frontend\\cypress\\support\\index.js',
  outputPath: 'C:\\Users\\mihl\\AppData\\Roaming\\Cypress\\cy\\production\\projects\\shopozor-management-frontend-0eebfd34bbd1c53d2a03b417d2f8dea5\\bundles\\cypress\\support\\index.js',
  shouldWatch: true }
end webpack
TypeError: path argument is required to res.sendFile
    at ServerResponse.sendFile (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\response.js:411:11)
    at ret (<anonymous>:14:23)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:29:16
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at Object.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:23:49)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\routes.js:40:19
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:137:13)
    at Route.dispatch (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:281:22
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:91:12)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at logger (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\morgan\index.js:112:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at compression (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\compression\index.js:220:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at cookieParser (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\cookie-parser\index.js:56:14)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resourccucumber:  EventEmitter {
  domain: null,
  _events: { rerun: [Function], close: [Function] },
  _eventsCount: 2,
  _maxListeners: undefined,
  filePath: 'D:\\webdev\\shopozor-management-frontend\\cypress\\integration\\Authentication\\LogStaffOut.feature',
  outputPath: 'C:\\Users\\mihl\\AppData\\Roaming\\Cypress\\cy\\production\\projects\\shopozor-management-frontend-0eebfd34bbd1c53d2a03b417d2f8dea5\\bundles\\cypress\\integration\\Authentication\\LogStaffOut.feature',
  shouldWatch: true }
es\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:113:18
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at expressInit (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\init.js:40:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at query (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\query.js:45:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:174:3)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\application.js:174:10)
    at Server.app (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\express.js:39:9)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\socket\node_modules\engine.io\lib\server.js:435:22)
    at Server._callRequestListeners (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:468:31)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:480:24)
    at emitTwo (events.js:125:13)
    at Server.emit (events.js:213:7)
    at parserOnIncoming (_http_server.js:602:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
end cucumber
?[0mGET /__cypress/tests?p=cypress%5Csupport%5Cindex.js-514 ?[32m200 ?[0m578.998 ms - 165?[0m
TypeError: path argument is required to res.sendFile
    at ServerResponse.sendFile (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\response.js:411:11)
    at ret (<anonymous>:14:23)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:29:16
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at Object.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:23:49)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\routes.js:40:19
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:137:13)
    at Route.dispatch (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:281:22
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:91:12)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at logger (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\morgan\index.js:112:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at compression (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\compression\index.js:220:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at cookieParser (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\cookie-parser\index.js:56:14)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:113:18
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at expressInit (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\init.js:40:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at query (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\query.js:45:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:174:3)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\application.js:174:10)
    at Server.app (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\express.js:39:9)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\socket\node_modules\engine.io\lib\server.js:435:22)
    at Server._callRequestListeners (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:468:31)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:480:24)
    at emitTwo (events.js:125:13)
    at Server.emit (events.js:213:7)
    at parserOnIncoming (_http_server.js:602:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)

In particular I was able to see this:

TypeError: path argument is required to res.sendFile

Here's my package.json:

{
  "name": "shopozor-manager",
  "version": "1.0.0",
  "description": "",
  "productName": "",
  "cordovaId": "org.cordova.quasar.app",
  "author": "Softozor",
  "private": true,
  "scripts": {
    "build": "quasar build",
    "lint": "eslint --ext .js,.vue src",
    "start": "quasar serve dist/spa-mat",
    "start:dev": "quasar dev",
    "test": "echo \"No test specified\" && exit 0",
    "e2e": "cypress run"
  },
  "cypress-cucumber-preprocessor": {
    "nonGlobalStepDefinitions": true
  },
  "dependencies": {
    "animate.css": "^3.7.0",
    "apollo-cache-inmemory": "^1.3.11",
    "apollo-client": "^2.4.7",
    "apollo-link": "^1.2.6",
    "apollo-link-http": "^1.5.9",
    "google-translate-api": "^2.3.0",
    "graphql": "^14.0.2",
    "graphql-tag": "^2.10.0",
    "node-fetch": "^2.3.0",
    "vue-apollo": "^3.0.0-beta.26",
    "vue-i18n": "^8.4.0",
    "vue-simple-calendar": "^4.0.2",
    "vue2-google-maps": "^0.10.5",
    "vuelidate": "^0.7.4"
  },
  "devDependencies": {
    "@cypress/webpack-preprocessor": "^4.0.3",
    "babel-eslint": "^10.0.1",
    "cypress": "^3.1.5",
    "cypress-cucumber-preprocessor": "^1.9.1",
    "eslint": "^5.10.0",
    "eslint-config-standard": "^12.0.0",
    "eslint-friendly-formatter": "^4.0.1",
    "eslint-loader": "^2.0.0",
    "eslint-plugin-cypress": "^2.2.0",
    "eslint-plugin-import": "^2.9.0",
    "eslint-plugin-node": "^8.0.0",
    "eslint-plugin-promise": "^4.0.1",
    "eslint-plugin-standard": "^4.0.0",
    "eslint-plugin-vue": "^5.0.0",
    "jwt-decode": "^2.2.0",
    "moment": "^2.22.2",
    "quasar-cli": "^0.17.23",
    "strip-ansi": "^3.0.1",
    "vue-template-compiler": "^2.5.18"
  },
  "engines": {
    "node": ">= 8.9.0",
    "npm": ">= 5.6.0",
    "yarn": ">= 1.6.0"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 10"
  ]
}```

@mkusher
Copy link
Contributor Author

mkusher commented Feb 13, 2019

if you remove loader does the problem goes away? I haven't found cypress-cucumber-preprocessor/loader in the stack trace you posted, it looks like the exception happens somewhere in babel-preset-env

@zadigus
Copy link

zadigus commented Feb 13, 2019

You mean if I comment this out?

      {
        test: /\.js$/,
        exclude: [/node_modules/],
        use: [{
          loader: 'babel-loader',
          options: {
            presets: ['babel-preset-env']
          }
        }]
      },

from my webpack.config.js? Then I get

TypeError: path argument is required to res.sendFile
    at ServerResponse.sendFile (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\response.js:411:11)
    at ret (<anonymous>:14:23)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:29:16
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at Object.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:23:49)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\routes.js:40:19
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:137:13)
    at Route.dispatch (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:281:22
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:91:12)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at logger (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\morgan\index.js:112:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at compression (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\compression\index.js:220:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at cookieParser (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\cookie-parser\index.js:56:14)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:113:18
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at expressInit (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\init.js:40:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at query (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\query.js:45:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:174:3)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\application.js:174:10)
    at Server.app (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\express.js:39:9)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\socket\node_modules\engine.io\lib\server.js:435:22)
    at Server._callRequestListeners (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:468:31)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:480:24)
    at emitTwo (events.js:125:13)
    at Server.emit (events.js:213:7)
    at parserOnIncoming (_http_server.js:602:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
?[0mGET /__cypress/tests?p=cypress%5Csupport%5Cindex.js-993 ?[32m200 ?[0m416.329 ms - 165?[0m
TypeError: path argument is required to res.sendFile
    at ServerResponse.sendFile (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\response.js:411:11)
    at ret (<anonymous>:14:23)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:29:16
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at Object.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:23:49)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\routes.js:40:19
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:137:13)
    at Route.dispatch (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:281:22
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:91:12)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at logger (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\morgan\index.js:112:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at compression (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\compression\index.js:220:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at cookieParser (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\cookie-parser\index.js:56:14)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:113:18
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at expressInit (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\init.js:40:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at query (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\query.js:45:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:174:3)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\application.js:174:10)
    at Server.app (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\express.js:39:9)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\socket\node_modules\engine.io\lib\server.js:435:22)
    at Server._callRequestListeners (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:468:31)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:480:24)
    at emitTwo (events.js:125:13)
    at Server.emit (events.js:213:7)
    at parserOnIncoming (_http_server.js:602:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
?[0mGET /__cypress/tests?p=cypress%5Cintegration%5CAuthentication%5CLogStaffIn.feature-995 ?[32m200 ?[0m421.336 ms - 165?[0m
?[0mGET /__cypress/iframes/integration/Authentication/LogStaffIn.feature ?[32m200 ?[0m5.108 ms - 763?[0m
TypeError: path argument is required to res.sendFile
    at ServerResponse.sendFile (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\response.js:411:11)
    at ret (<anonymous>:14:23)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:29:16
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at Object.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:23:49)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\routes.js:40:19
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:137:13)
    at Route.dispatch (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:281:22
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:91:12)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at logger (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\morgan\index.js:112:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at compression (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\compression\index.js:220:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at cookieParser (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\cookie-parser\index.js:56:14)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:113:18
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at expressInit (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\init.js:40:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at query (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\query.js:45:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:174:3)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\application.js:174:10)
    at Server.app (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\express.js:39:9)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\socket\node_modules\engine.io\lib\server.js:435:22)
    at Server._callRequestListeners (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:468:31)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:480:24)
    at emitTwo (events.js:125:13)
    at Server.emit (events.js:213:7)
    at parserOnIncoming (_http_server.js:602:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
?[0mGET /__cypress/tests?p=cypress%5Csupport%5Cindex.js-257 ?[32m200 ?[0m10.755 ms - 165?[0m
TypeError: path argument is required to res.sendFile
    at ServerResponse.sendFile (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\response.js:411:11)
    at ret (<anonymous>:14:23)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:29:16
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at Object.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\controllers\spec.js:23:49)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\routes.js:40:19
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:137:13)
    at Route.dispatch (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:281:22
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:91:12)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at logger (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\morgan\index.js:112:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at compression (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\compression\index.js:220:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at cookieParser (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\cookie-parser\index.js:56:14)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:113:18
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at expressInit (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\init.js:40:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at query (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\middleware\query.js:45:5)
    at Layer.handle [as handle_request] (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:275:10)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\router\index.js:174:3)
    at Function.handle (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\application.js:174:10)
    at Server.app (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\node_modules\express\lib\express.js:39:9)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\socket\node_modules\engine.io\lib\server.js:435:22)
    at Server._callRequestListeners (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:468:31)
    at Server.<anonymous> (C:\Users\mihl\AppData\Local\Cypress\Cache\3.1.5\Cypress\resources\app\packages\server\lib\server.js:480:24)
    at emitTwo (events.js:125:13)
    at Server.emit (events.js:213:7)
    at parserOnIncoming (_http_server.js:602:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)

@zadigus
Copy link

zadigus commented Feb 13, 2019

Just to add more precision. My feature tests totally work if I do this:

// plugin/index.js
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = on => on('file:preprocessor', cucumber())

If I, however, define this, then I get the errors mentionned before:

// plugins/index.js
const webpack = require('@cypress/webpack-preprocessor')

module.exports = on => {
  const options = {
    webpackOptions: require('../webpack.config.js')
  }
  on('file:preprocessor', webpack(options))
}

and

// webpack.config.js
module.exports = {
  resolve: {
    extensions: ['.js']
  },
  module: {
    rules: [
        {
          test: /\.feature$/,
          use: [
            {
              loader: 'cypress-cucumber-preprocessor/loader'
            }
          ],
          exclude: /(node_modules)/
        }
      ]
    }
}

@mkusher
Copy link
Contributor Author

mkusher commented Feb 13, 2019

what if you comment feature loader?

@zadigus
Copy link

zadigus commented Feb 14, 2019

Same problem. It seems to be an issue of the webpack-preprocessor. I feed it with the correct config but it doesn't seem to pre-process anything. Therefore, I get back to my initial question: with what versions of webpack and webpack-preprocessor is that supposed to work? Or do I need to add an option somewhere in cypress to make it understand that it needs to use webpack?

@mkusher
Copy link
Contributor Author

mkusher commented Feb 14, 2019

so, the problem is not with cucumber-preprocessor. Right now I'm using "@cypress/webpack-preprocessor": "^4.0.3" with the loader

@zadigus
Copy link

zadigus commented Feb 14, 2019

I don't think the cucumber-preprocessor is the problem because I the following code works as expected:

// plugin/index.js
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = on => on('file:preprocessor', cucumber())

And I am using the very same webpack-preprocessor version as you do. I'm clueless...

@mkusher
Copy link
Contributor Author

mkusher commented Feb 14, 2019

since the problem is not with this package and this loader, the better place to ask is https://github.com/cypress-io/cypress-webpack-preprocessor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants