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.

The `@babel/plugin-transform-runtime` is not found

See original GitHub issue

Why we need this? As long as I know it should be used as devDependency, so why when generating production builds we need it?

And should I add it in my preset too? And one side question: does the plugin reads babel.config.js when found AND you have babelConfig option set? My assumption is it’s not? Just for verification.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wessbergcommented, Nov 9, 2019

@babel/plugin-transform-runtime is added to and merged with the users provided Babel config if it doesn’t already include it. The only reason why it is added is to move shared Babel helpers into import statements rather than duplicating them inline such that they can be shared across chunks without duplication.

The reason why you may get the error in the issue title is if you depend on another library that depends strictly on a different version of @babel/plugin-transform-runtime (such as tsdx does).

As for the side-question: If you override the babelConfig option, your babel.config.js file won’t be resolved, so your assumption is correct 😊

0reactions
tunnckoCorecommented, Nov 11, 2019

It’s not example repo. And the thing is long gone. 😉

I couldn’t find the changes I did for that specific issue i linked. So anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module '@babel/plugin-transform-runtime' from
I m getting the error " Cannot find module '@babel/plugin-transform-runtime' from ...". I have tried every solution on the internet but ...
Read more >
"Error: Cannot find module 'babel-plugin-transform-runtime ...
Hello, I had the same issue! I just deleted my node_modules folder, and the package-lock.json, then run npm install, and it solved my...
Read more >
babel/plugin-transform-runtime
A plugin that enables the re-use of Babel's injected helper code to save on codesize.
Read more >
@babel/plugin-transform-runtime - npm
@babel/plugin-transform-runtime. Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals.
Read more >
babel-plugin-transform-runtime - npm package - Snyk
The npm package babel-plugin-transform-runtime was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was ...
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