Giter Club home page Giter Club logo

Comments (3)

earthtone avatar earthtone commented on July 23, 2024 2

There is a known bug in parcel that can cause this error, regardless of how your .babelrc is configured. Bumping all targets in the browserslist node in package.json to "last 1 X" fixes this bug for me without needing babel-polyfill or deviating .babelrc from the course notes.

from complete-intro-to-react-v5.

tjoaquini avatar tjoaquini commented on July 23, 2024 1

@eostrom try the solution in the following link. It worked for me.

jestjs/jest#7579 (comment)

Here is how my .babelrc file looks like

{
	"presets": [
		"@babel/preset-react", 
		["@babel/preset-env", { "targets": { "node": "current" } }]
	],
	"plugins": ["@babel/plugin-proposal-class-properties"]
}

from complete-intro-to-react-v5.

btholt avatar btholt commented on July 23, 2024

Yeah, the key there is preset-env. Regenerator allows you to do generators with ES5 code and the way that async/await is translated is by making it work with generators. So once you started targeting node: current it basically told Babel to stop translating from async/await to ES5-compatible Regenerator code.

from complete-intro-to-react-v5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.