question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build fails with @babel/preset-env 7.4.0

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:12
  • Comments:38 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
nicolo-ribaudocommented, Mar 19, 2019

We just released @babel/preset-env@7.4.1, which should fix the issue.

7reactions
BobNobraincommented, Mar 19, 2019

I have the same issue. Full error output looks like

 ERROR  Failed to compile with 1 errors                                                                         01:04:29

 error  in ./src/main.js

Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /home/bob/git/misc/test/src/main.js: Cannot find module '@babel/preset-env/data/built-ins.json' (While processing: "/home/bob/git/misc/test/node_modules/@vue/babel-preset-app/index.js")
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at getPolyfills (/home/bob/git/misc/test/node_modules/@vue/babel-preset-app/index.js:18:24)
    at module.exports (/home/bob/git/misc/test/node_modules/@vue/babel-preset-app/index.js:105:17)
    at loadDescriptor (/home/bob/git/misc/test/node_modules/@babel/core/lib/config/full.js:165:14)
    at cachedFunction (/home/bob/git/misc/test/node_modules/@babel/core/lib/config/caching.js:33:19)
    at loadPresetDescriptor (/home/bob/git/misc/test/node_modules/@babel/core/lib/config/full.js:235:63)
    at config.presets.reduce (/home/bob/git/misc/test/node_modules/@babel/core/lib/config/full.js:77:21)
    at Array.reduce (<anonymous>)
    at recurseDescriptors (/home/bob/git/misc/test/node_modules/@babel/core/lib/config/full.js:74:38)
    at loadFullConfig (/home/bob/git/misc/test/node_modules/@babel/core/lib/config/full.js:108:6)
    at process.nextTick (/home/bob/git/misc/test/node_modules/@babel/core/lib/transform.js:28:33)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

 @ multi (webpack)-dev-server/client?http://192.168.1.182:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
Read more comments on GitHub >

github_iconTop Results From Across the Web

babel/preset-env
babel /preset-env` is a smart preset that allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and optionally, ......
Read more >
16 - Stack Overflow
So I have been trying to setup React Js environment. I am facing the babel dependencies error. I know this ...
Read more >
@babel/preset-env - npm
A Babel preset for each environment.. Latest version: 7.20.2, last published: 2 months ago. Start using @babel/preset-env in your project by ...
Read more >
npm install @babel/core @babel/preset-env - You.com
How to fix "Module build failed (from ./node_modules/babel-loader/lib/index.js):"? Asked May 12, 2019 • 8 votes 4 answers.
Read more >
@babel/core - NPM Package Versions - Socket
(@JLHwung). babel-helper-wrap-function , babel-preset-env , babel-traverse ... babel-core. #11612 Make error message prefixes more descriptive (@eps1lon) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found