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.

@babel/core v7.13.0 bugs causing builds to fail on new installs

See original GitHub issue

Current Behavior

npx tsdx create my-project

Choose react with storybook

Errors during the build phase with

(babel plugin) TypeError: Cannot read property 'resolved' of undefined
TypeError: Cannot read property 'resolved' of undefined
    at /home/user/my-project/node_modules/tsdx/dist/babelPluginTsdx.js:19:94
    at Array.findIndex (<anonymous>)
    at /home/user/my-project/node_modules/tsdx/dist/babelPluginTsdx.js:19:54
    at Array.forEach (<anonymous>)
    at /home/user/my-project/node_modules/tsdx/dist/babelPluginTsdx.js:18:27
    at Array.forEach (<anonymous>)
    at Object.exports.mergeConfigItems (/home/user/my-project/node_modules/tsdx/dist/babelPluginTsdx.js:17:24)
    at Object.config (/home/user/my-project/node_modules/tsdx/dist/babelPluginTsdx.js:109:40)
    at transformCode (/home/user/my-project/node_modules/@rollup/plugin-babel/dist/index.js:239:86)
    at async Promise.all (index 0)

It appears the latest version of @babel/core broke the config merging.

Expected behavior

TSDX can create new projects

Suggested solution(s)

Current workaround is to lock package.json to "@babel/core": "7.12.17" via resolutions

"resolutions": {
  "**/@babel/core": "7.12.17"
}

Additional context

Your environment

System:
    OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 5.76 GB / 15.37 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 12.19.0 - ~/.nvm/versions/node/v12.19.0/bin/node
    Yarn: 1.22.5 - /usr/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v12.19.0/bin/npm
  Browsers:
    Chrome: 88.0.4324.182
    Firefox: 85.0.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

3reactions
hzoocommented, Feb 23, 2021

It’s also incredibly recent and likely to be fixed by tomorrow if not within the next few hours.

@agilgur5, yep publishing a new version now! https://github.com/babel/babel/runs/1957418439

2reactions
marklawlorcommented, Feb 23, 2021

@agilgur5 v7.13.1 works for a clean install.

@derrickmehaffy cheers that fixed the last issue with my project

Read more comments on GitHub >

github_iconTop Results From Across the Web

babel/core v7.13.0 bugs causing builds to fail on new installs
It appears the latest version of @babel/core broke the config merging. Expected behavior. TSDX can create new projects. Suggested solution(s).
Read more >
Builds started failing after build image update - Support
Regarding not being able to select Xenial, it has been disabled so people migrate to the new build image before it's deprecated.
Read more >
Requires Babel "7.0.0-0" but was loaded with "6.26.3"
This causes webpack-cli to complain of 'Unable to use specified module loaders for ".babel.js".' Simply install @babel/register in that case. – ...
Read more >
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 >
Update core JavaScript dependencies listed in package.json
Here's a table of all core JavaScript dependencies in the package.json that yarn outdated reports as having available updates - this includes ...
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