Skip to content

Babel unknown option when trying to integrate JestΒ #5165

@sts-ryan-holton

Description

@sts-ryan-holton

Version

4.1.2

Environment info

System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  Binaries:
    Node: 10.15.3 - /usr/local/bin/node
    Yarn: 1.5.1 - /usr/local/bin/yarn
    npm: 6.13.4 - /usr/local/bin/npm
  Browsers:
    Chrome: 79.0.3945.130
    Firefox: 72.0.2
    Safari: 13.0.2
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.1.2 
    @vue/babel-preset-app:  4.1.2 (3.12.1)
    @vue/babel-preset-jsx:  1.1.2 
    @vue/babel-sugar-functional-vue:  1.1.2 
    @vue/babel-sugar-inject-h:  1.1.2 
    @vue/babel-sugar-v-model:  1.1.2 
    @vue/babel-sugar-v-on:  1.1.2 
    @vue/cli-overlay:  4.1.2 
    @vue/cli-plugin-babel: ^4.1.0 => 4.1.2 
    @vue/cli-plugin-eslint: ^4.1.0 => 4.1.2 
    @vue/cli-plugin-router:  4.1.2 
    @vue/cli-plugin-vuex:  4.1.2 
    @vue/cli-service: ^4.1.0 => 4.1.2 
    @vue/cli-shared-utils:  4.1.2 
    @vue/component-compiler:  3.6.0 
    @vue/component-compiler-utils:  3.1.1 (2.6.0)
    @vue/preload-webpack-plugin:  1.1.1 
    @vue/test-utils: ^1.0.0-beta.31 => 1.0.0-beta.31 
    @vue/web-component-wrapper:  1.2.0 
    eslint-plugin-vue: ^5.0.0 => 5.2.3 
    rollup-plugin-vue:  4.7.2 
    vue: 2.6.11 => 2.6.11 
    vue-cli-plugin-p11n: ^0.4.0 => 0.4.0 
    vue-eslint-parser:  5.0.0 
    vue-hot-reload-api:  2.3.4 
    vue-jest: ^3.0.5 => 3.0.5 
    vue-loader:  15.8.3 
    vue-resource: 1.5.1 => 1.5.1 
    vue-router:  3.1.5 
    vue-runtime-helpers:  1.0.0 
    vue-server-renderer:  2.6.11 
    vue-style-loader:  4.1.2 
    vue-template-compiler: 2.6.11 => 2.6.11 
    vue-template-es2015-compiler:  1.9.1 
    vuepress:  1.2.0 
    vuepress-html-webpack-plugin:  3.2.0 
    vuepress-plugin-container: ^2.1.2 => 2.1.2 
    vuepress-plugin-smooth-scroll:  0.0.3 
  npmGlobalPackages:
    @vue/cli: 4.2.2

Steps to reproduce

I've got a spec file setup in my Components directory, every time I try to run the Jest commands in my Vue project created with the CLI it complains about my Babel configuration despite being the defaults:

My babel config:

module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ]
}

Apparently this is invalid? And commands fail with ReferenceError: [BABEL] unknown: Unknown option

What is expected?

Commands should not fail with default config

What is actually happening?

Commands are failing


I've tried changing the config and removing it, neither of these work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproductionThis issue is missing a minimal runnable reproduction, provided by the author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions