10:Browser Compatibility and Transpilation step 8/11


first instruction was successfully run
touch .babelrc

I am not sure what to do in second instruction . How to add add an object that specifies the preset to “env”?

Meh. I edited the file from the terminal and it refused to pass until I opened it in the editor. Worse yet is that it has to match what the course author anticipated:

if (Components.CodeEditor.codeContains('.babelrc', /\{(.|\n)*("|')presets("|')\s*\:(.|\n)*\[\s*('|")env("|')\s*\](.|\n)*\}/)) {
    return { pass: true };

…But then again, all there really is to it is to read the instructions, because they say what to do, even shows exactly what the content in that file should be.

There is an folder icon left to the main.js title in the middle block, there you find the .babelrc file. Took me 20 minutes to find it as well. The rest should work easily.

1 Like

i found the folder, thanks for pointing to it but now it says command not found.
touch .babelrc
$ .babelrc {“presets”: [“env”]}
bash: .babelrc: command not found
$ {“presets”: [“env”]}
bash: {presets:: command not found
$ {“presets”:[“env”]}
bash: {presets:[env]}: command not found

You were supposed to edit a file

oh OKay. I have added the text in file .babelrc.
Thank you very much.
(mystery solved)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.