FAQ: Browser Compatibility and Transpilation - Babel Configuration

This community-built FAQ covers the “Babel Configuration” exercise from the lesson “Browser Compatibility and Transpilation”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Create a Front-End App with React
Create a Back-End App with JavaScript

Learn Build Tools

FAQs on the exercise Babel Configuration

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!
You can also find further discussion and get answers to your questions over in #get-help.

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head to #get-help and #community:tips-and-resources. If you are wanting feedback or inspiration for a project, check out #project.

Looking for motivation to keep learning? Join our wider discussions in #community

Learn more about how to use this guide.

Found a bug? Report it online, or post in #community:Codecademy-Bug-Reporting

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

Hello! Can anyone help me through this lesson please? step by step walkthrough would be so appreciated! I’ve tried different ways and can’t seem to get it right.

I’m having difficulty with step 3

Update: I’ve made it to step 5 but I do not have a dog.js file inside the out folder.

What are you stuck on?

I am the wrong person to help you with specific questions, but I can explain what I did to figure it out. I was almost to the end, but I was hung up on the last step. After multiple fails, I chose their solution and then worked backward to figure out how it was done, and this also included looking at the cheat sheet and googling “install Babel”.

Hi there!

I will summarize what I did:

  1. In the terminal => npm init -y

  2. In the code editor => Click on the folder icon located at top left corner. A package.json file has been created. Iniside this file there is an object. Modify the property “scripts” by adding “build” : “babel src -d out” (remember to put a comma between). Click Run.

  3. In the code editor => Click on the folder icon located at top left corner. Click on the File add icon (the last icon located at right). Name this new file as “.babelrc”. Open it. Inside it write: {
    “presets”: ["@babel/preset-env"]
    }. Click Run.

  4. In the terminal => npm run build. A new Dog.js is created inside Out folder (transpilation of the original one).

  5. Open the new Dog.js and click Run.

Hope this helps!


I’m inputting npm init -y into the terminal and it’s not making the package.js.