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.

[Bug]: Repl fails with `.method must be a string (While processing: "base$1")`

See original GitHub issue

💻

  • Would you like to work on a fix?

How are you using Babel?

Other (Next.js, Gatsby, vue-cli, …)

Input code

https://babeljs.io/repl/#?browsers=ie 11&build=&builtIns=false&corejs=3.6&spec=false&loose=false&code_lz=LYQwlgdgFAlA3AKAGYCZaIDYFMAuACMPAXjwAZEQBnATwgGM8kBXenMAewj1EljwG8EePHU6V22AHQZ2AcygAiABZgF8IXhAB3cPm268EJhgyJhoiOKkz5YdQF8ECKrQbNWHLqj6Dh-sPhGJmaaOgGGxqYaYADUMYiOQA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=env%2Creact%2Cstage-2&prettier=false&targets=&version=7.16.3&externalPlugins=%40babel%2Fplugin-transform-regenerator%407.16.0%2Cbabel-plugin-polyfill-regenerator%400.2.3&assumptions={}

I added “babel-plugin-polyfill-regenerator” and now it says [BABEL] /repl.jsx: .method must be a string (While processing: "base$1")

Configuration file name

No response

Configuration

REPL issue

Current and expected behavior

Current behavior: [BABEL] /repl.jsx: .method must be a string (While processing: "base$1")

Expected behavior: Either a readable error message indicating what I did wrong, if I did something wrong, or some output code.

Environment

Not applicable

Possible solution

No response

Additional context

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JLHwungcommented, Nov 10, 2021

The REPL currently does not support plugin with required options. In this case, the plugin-polyfill-regenerator requires a method: "usage-global" | "usage-pure" | "entry-global" option. As a workaround you can use preset-env, which uses plugin-polyfill-regenerator under the hood.

I will move this issue to the website repo.

0reactions
danieltrogercommented, Nov 10, 2021

Because we don’t have regenerator runtime in the browsers. The execute toggle runs the transpiled code, unfortunately, without polyfills. Would you mind open a new issue against that?

Oh, I didn’t notice the evaluate toggle. Actually it does work, because the REPL itself contains regeneratorRuntime.

But IMO the output code of the REPL should be the same as of babel on the CLI. I pasted it into another tab and got the error there.

Should I still open an issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am getting a error because processing is messing up. - Replit
I checked console log and discovered that processing autogenerated code that doesnt work when my project did work. I will show the weird...
Read more >
Error while compiling incremental system image with Flux #641
The script to create a sysimage in this repo throws the following error with PackageCompiler v2.0.2 while loading the project and module ...
Read more >
Bug descriptions — spotbugs 4.7.3 documentation
This document lists the standard bug patterns reported by SpotBugs. ... When debugging tests that fail due to bad casts, it may be...
Read more >
DFSMS Access Method Services Commands - IBM
Use Access Method Services to Define a GDG and JCL to Define a GDS in that ... set name specification and will result...
Read more >
Bug Patterns - Error Prone
Defaults for AutoValue Builders should be set in the factory method returning ... Preconditions only accepts the %s placeholder in error message strings....
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