A strange behavior in the console, I do not know whether It is a bug or It is a problem of my browser

I do know that the code right here is correct but the thing I am asking for is why It is trowing a reference error that says "exports is not defined"


export default function subtract(x, y) {
return x - y;
}

Did It happen because the code was not within a script module?

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36.

Welcome, AVR.

Could you please provide context as to what you are trying to do?

Does this have to do with one of the freeCodeCamp curriculum lessons? If so, which one?

Or, has this come up in a different environment? If so, what is your setup/architecture?

I was doing this challenge https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/create-an-export-fallback-with-export-default (I do not why the link was deleted lol)

Besides, all of the lessons that theaches about modules throws reference errors

Ah, thank you, for clarifying.

I think this is something that has been mentioned before, although I cannot find the reference. It is not your browser, and is an expected bug.

Perhaps this is something that can be looked into by catching that error, and throwing something more useful.