Skip to content

test:unit with jest can't find babel in freshly created project #1424

@davestaab

Description

@davestaab

Version

3.0.0-beta.15

Reproduction link

https://github.com/davestaab/vue-cli-jest-broken.git

Steps to reproduce

  1. install the new 3.0.0-beta.15 cli
  2. create a new app with vue create test-app
  3. select pwa, eslint, unit-jest e2e-cypress as the features
  4. run unit tests with npm run test:unit

Unit tests fail with error:

Test suite failed to run

Cannot find module '@babel/core'
    at Object.<anonymous> (node_modules/babel-core/index.js:2:18)

What is expected?

The basic unit test is expected to run and pass

What is actually happening?

The unit tests can't run and fails.
Error message is:

Test suite failed to run

Cannot find module '@babel/core'
    at Object.<anonymous> (node_modules/babel-core/index.js:2:18)

It seems to be related to the e2e-cypress plugin.
If I don't choose cypress I can get it to run the jest tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions