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

Unknown option: .useBuiltIns. in babel.config.js #2594

Closed
latel opened this issue Sep 25, 2018 · 6 comments
Closed

Unknown option: .useBuiltIns. in babel.config.js #2594

latel opened this issue Sep 25, 2018 · 6 comments

Comments

@latel
Copy link

latel commented Sep 25, 2018

Version

3.0.1

Reproduction link

https://github.com/latel/vue-bad-babel

Node and OS info

Node 10.4.0 / npm 3.10.6 / Windows 7

Steps to reproduce

npm run build

What is expected?

everything works alright

What is actually happening?

$ npm run build

> vue-bad-babel@0.1.0 build F:\vue-bad-babel
> vue-cli-service build


\  Building for production...Starting type checking service...
Using 1 worker with 2048MB memory limit
|  Building for production...

 ERROR  Failed to compile with 1 errors                                                                                                                                                                           13:10:42

 error  in ./src/main.ts

Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
[BABEL] F:\vue-bad-babel\src\main.ts: Unknown option: .useBuiltIns. Check out http://babeljs.io/docs/usage/options/ for more information about options.

    at buildUnknownError (F:\vue-bad-babel\node_modules\@babel\core\lib\config\validation\options.js:113:11)
    at Object.keys.forEach.key (F:\vue-bad-babel\node_modules\@babel\core\lib\config\validation\options.js:99:57)
    at Array.forEach (<anonymous>)
    at validate (F:\vue-bad-babel\node_modules\@babel\core\lib\config\validation\options.js:69:21)
    at instantiatePreset (F:\vue-bad-babel\node_modules\@babel\core\lib\config\full.js:242:36)
    at cachedFunction (F:\vue-bad-babel\node_modules\@babel\core\lib\config\caching.js:42:19)
    at loadPresetDescriptor (F:\vue-bad-babel\node_modules\@babel\core\lib\config\full.js:233:45)
    at config.presets.map.descriptor (F:\vue-bad-babel\node_modules\@babel\core\lib\config\full.js:68:19)
    at Array.map (<anonymous>)
    at recurseDescriptors (F:\vue-bad-babel\node_modules\@babel\core\lib\config\full.js:66:38)

 @ multi ./src/main.ts

 ERROR  Build failed with errors.

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v10.4.0
npm ERR! npm  v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! vue-bad-babel@0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-bad-babel@0.1.0 build script 'vue-cli-service build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the vue-bad-babel package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     vue-cli-service build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs vue-bad-babel
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls vue-bad-babel
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     F:\vue-bad-babel\npm-debug.log

https://cli.vuejs.org/guide/browser-compatibility.html#browserslist

as documented here, all @babel/preset-env options should available through @vue/babel-preset-app.

@latel
Copy link
Author

latel commented Sep 25, 2018

here is installed dependencies, if it helps:

$ npm ls --depth=0
vue-bad-babel@0.1.0 F:\vue-bad-babel
+-- @types/chai@4.1.5
+-- @types/mocha@5.2.5
+-- @vue/cli-plugin-babel@3.0.3
+-- @vue/cli-plugin-eslint@3.0.3
+-- @vue/cli-plugin-typescript@3.0.3
+-- @vue/cli-plugin-unit-mocha@3.0.3
+-- @vue/cli-service@3.0.3
+-- @vue/eslint-config-prettier@3.0.3
+-- @vue/eslint-config-typescript@3.0.3
+-- @vue/test-utils@1.0.0-beta.25
+-- chai@4.1.2
+-- node-sass@4.9.3
+-- sass-loader@7.1.0
+-- typescript@3.0.3
+-- vue@2.5.17
+-- vue-router@3.0.1
+-- vue-template-compiler@2.5.17
`-- vuex@3.0.1

@latel
Copy link
Author

latel commented Sep 25, 2018

my babel config format is error.

Should be [["@vue/app",{useBuiltIns: "entry"}]]

Not ["@vue/app",{useBuiltIns: "entry"}]

@latel latel closed this as completed Sep 25, 2018
@tataqiuqiu
Copy link

my babel config format is error.

Should be [["@vue/app",{useBuiltIns: "entry"}]]

Not ["@vue/app",{useBuiltIns: "entry"}]

thank you

@coding-chris-kao
Copy link

my babel config format is error.

Should be [["@vue/app",{useBuiltIns: "entry"}]]

Not ["@vue/app",{useBuiltIns: "entry"}]

Thanks!

@rafegoldberg
Copy link

what a ridiculous issue; @latel you're the man! thanks for the help! this should def. be specified in the docs.

@bivainis
Copy link

As seen on official Babel docs:
https://babeljs.io/docs/en/presets#preset-options
https://babeljs.io/docs/en/babel-preset-env#browserslist-integration

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "useBuiltIns": "entry"
      }
    ]
  ]
}

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

No branches or pull requests

5 participants