Skip to content

Vue create broken when selecting cypress for E2E testing  #2667

Closed
@assembledadam

Description

@assembledadam

Version

3.0.4

Reproduction link

https://github.com/vuejs/vue-cli/tree/v3.0.4

Node and OS info

Node v10.11.0 / Tested on MacOS High Sierra 10.13.6 and Debian Jessie (Docker node:latest)

Steps to reproduce

Run $ vue create hello-world

With the following settings:
Vue CLI v3.0.4
? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, Router, Vuex, CSS Pre-processors, Linter, Unit, E2E
? Use history mode for router? (Requires proper server setup for index fallback in production) Yes
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Sass/SCSS
? Pick a linter / formatter config: Airbnb
? Pick additional lint features: Lint on save
? Pick a unit testing solution: Mocha
? Pick a E2E testing solution: Cypress
? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedicated config files

What is expected?

Successful installation

What is actually happening?

⠋  Running completion hooks...error: '@cypress/webpack-preprocessor' should be listed in the project's dependencies. Run 'npm i -S @cypress/webpack-preprocessor' to add it (import/no-extraneous-dependencies) at claimer-app/tests/e2e/plugins/index.js:2:17:
  1 | // https://docs.cypress.io/guides/guides/plugins-guide.html
> 2 | const webpack = require('@cypress/webpack-preprocessor');
    |                 ^
  3 | 
  4 | module.exports = (on, config) => {
  5 |   on('file:preprocessor', webpack({


error: Unexpected require() (global-require) at claimer-app/tests/e2e/plugins/index.js:6:21:
  4 | module.exports = (on, config) => {
  5 |   on('file:preprocessor', webpack({
> 6 |     webpackOptions: require('@vue/cli-service/webpack.config'),
    |                     ^
  7 |     watchOptions: {},
  8 |   }));
  9 | 


error: '@vue/cli-service' should be listed in the project's dependencies, not devDependencies (import/no-extraneous-dependencies) at claimer-app/tests/e2e/plugins/index.js:6:21:
  4 | module.exports = (on, config) => {
  5 |   on('file:preprocessor', webpack({
> 6 |     webpackOptions: require('@vue/cli-service/webpack.config'),
    |                     ^
  7 |     watchOptions: {},
  8 |   }));
  9 | 


3 errors found.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions