vue-cli: Build fails with @babel/preset-env 7.4.0
This has been fixed in @babel/preset-env@7.4.1. You will need to delete yarn.lock/package-lock.json and run yarn/npm i again.
Version
3.5.1
Environment info
Environment Info:
System:
OS: Linux 4.18 Debian GNU/Linux 9 (stretch) 9 (stretch)
CPU: (12) x64 Intel(R) Xeon(R) CPU D-1531 @ 2.20GHz
Binaries:
Node: 11.12.0 - /usr/bin/node
Yarn: 1.15.2 - /usr/bin/yarn
npm: 6.7.0 - /usr/bin/npm
Browsers:
Chrome: Not Found
Firefox: Not Found
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.0.0-beta.2
@vue/babel-plugin-transform-vue-jsx: 1.0.0-beta.2
@vue/babel-preset-app: 3.5.1
@vue/babel-preset-jsx: 1.0.0-beta.2
@vue/babel-sugar-functional-vue: 1.0.0-beta.2
@vue/babel-sugar-inject-h: 1.0.0-beta.2
@vue/babel-sugar-v-model: 1.0.0-beta.2
@vue/babel-sugar-v-on: 1.0.0-beta.2
@vue/cli-overlay: 3.5.1
@vue/cli-plugin-babel: ^3.5.0 => 3.5.1
@vue/cli-plugin-eslint: ^3.5.0 => 3.5.1
@vue/cli-service: ^3.5.0 => 3.5.1
@vue/cli-shared-utils: 3.5.1
@vue/component-compiler-utils: 2.6.0
@vue/preload-webpack-plugin: 1.1.0
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: ^5.0.0 => 5.2.2
vue: ^2.6.6 => 2.6.9
vue-eslint-parser: 5.0.0
vue-hot-reload-api: 2.3.3
vue-loader: 15.7.0
vue-style-loader: 4.1.2
vue-template-compiler: ^2.5.21 => 2.6.9
vue-template-es2015-compiler: 1.9.1
npmGlobalPackages:
@vue/cli: Not Found
Steps to reproduce
yarn global add @vue/cli
vue create -d vue-cli-test
cd vue-cli-test
yarn build
What is expected?
A successful build.
What is actually happening?
The build fails because @babel/preset-env/data/built-ins.json can’t be found. It seems this file doesn’t exist anymore as of @babel/preset-env 7.4.0.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 12
- Comments: 38 (1 by maintainers)
Commits related to this issue
- Alias @babel/preset-env/data/built-ins.json.js Fixes vuejs/vue-cli#3671 — committed to nicolo-ribaudo/babel by nicolo-ribaudo 5 years ago
- Alias @babel/preset-env/data/built-ins.json.js (#9711) Fixes vuejs/vue-cli#3671 Even if it has the `.js` extension, `require("@babel/preset-env/data/built-ins.json")` will still work. — committed to babel/babel by nicolo-ribaudo 5 years ago
- built-ins.jsonが見つからないエラーの対処 https://github.com/vuejs/vue-cli/issues/3671 — committed to kkoji/vue.js-lecture by deleted user 5 years ago
We just released
@babel/preset-env@7.4.1, which should fix the issue.I have the same issue. Full error output looks like
OK, I am working again. 😃
One thing I noticed was:
@nicolo-ribaudo I’ve added a note at the top.
In the meantime adding
"@babel/preset-env": "7.3.4",to your package.json should do the trick.I had to delete
yarn.lock. You may be able to find the reference to7.4.0in the lockfile as well and remove that manually.isPluginRequiredhas moved and the built-ins have changed tocorejs2-built-ins.json. The following update resolves the issue:Edit: I forgot to specify the file
@vue/babel-preset-app/index.jsCan confirm, does work! 😃
A PR has been open bringing back isPluginRequired but won’t fix the built-ins.json issue. https://github.com/babel/babel/pull/9709 Issue related: https://github.com/babel/babel/issues/9707
@markg85
@vue/cli-plugin-babeldependency in your project is the latest versionnpm install --save core-js@2in the project root.No I get the other error:
@nicolo-ribaudo Yeah, that seems to fix the issue.
Ok,
isPluginRequiredwas just merged in https://github.com/babel/babel/pull/9709, butbuilt-insfile was notJust done a fresh
vue create, added this to the dev depdendencies, but still getting:isPluginRequired is not a function- any ideas?Related babel commit: https://github.com/babel/babel/commit/3303b079c596e56909adff4b834f098f5f1d8e2a