Did you add {"presets": ["env"]} to .babelrc?


#1

I have added the recommended code to the file ‘.babelrc’, yet the ‘Run’ still gives me the error: ‘Did you add {“presets”: [“env”]} to .babelrc?’

Please help.


#2

If anyone is having this issue, here’s what you should do:

After running “touch .babelrc” in bash, you should go to the middle pane (the place where you used to edit JS files in previous sections), you can see on the top of this pane the file name which is “main.js”. Click on the folder icon just left to the file name. From there you can open .babelrc file to add {“presets”…etc. Once finished click on Run and you’re done.

I have tried to add the text using cat and vi but that didn’t work. I think I found the correct way to do it by chance. Since section 8/11 is the first section where we had to deal with the folder icon, it might be better if codeacademy edits the second instruction and clearly instruct the user to do that.
e.g
Instruction #2: Don’t edit the .babelrc file in bash. Instead click on the folder icon located in the top left of the opened JS file (main.js). Then open .bablerc file and add an object that specifies the preset to “env”. Click on Run once you’ve added the object. (or something along those lines)


#3

Good cause I was going crazy thinking I had a syntax error.


#4

Thank you! I’m new to using command line arguments so I couldn’t open the file through the terminal, and this helped me immensely.


#5