freeCodeCamp: ES6 Import/Export Challenges Broken

Identified in issue #16207 and PR #16201 The final 6 challenges in the ES6 section teach the user about using import and export. Challenges 23, 25, 27 produce: require is not defined Challenges 24, 26 produce: exports is not defined

Not sure where to start with this issue; however, we need to figure this out before launching Beta.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

@QuincyLarson, Since this is closed and merged, should it be removed from the TODO list?

So, this stuff is a bit flaky. For http://localhost:3000/en/challenges/es6/use-export-to-reuse-a-code-block, it mentions that export {foo, bar} is acceptable, but the regex is set up to only validate:

export const foo = “bar”

Anyway, we can tighten up the regex later.

I think what’s worse is that the error messages are so obfuscated!

If we break the normal event flow and introduce a special case, it should be easy to fake it. The validator passes. I’m not sure what tries to do the actual require. Another option is to add a faked window.require which can respond with mock data. I can try that as an option.

Sent from my iPhone

On Dec 22, 2017, at 8:22 PM, Quincy Larson <notifications@github.commailto:notifications@github.com> wrote:

@BerkeleyTruehttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fberkeleytrue&data=02|01||e25533207c5c453e2c1608d549bcce58|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636495997614563275&sdata=xlw4GtMvXsdZ8SBCQUayG4ctVP0q17WQ4AlD%2Fmohmi0%3D&reserved=0 Could there be a way we could fake this for the purpose of teaching it?

Are we planning to support import/export statements in the near future? Will campers be able to build projects codepen-style on freeCodeCamp without using these?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FfreeCodeCamp%2FfreeCodeCamp%2Fissues%2F16235%23issuecomment-353705991&data=02|01||e25533207c5c453e2c1608d549bcce58|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636495997614563275&sdata=M%2BoK4FUmknj%2BJs4QtOEFXbKszusfTFAf6UW2DAVy3kc%3D&reserved=0, or mute the threadhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAtuHPidsEdB5ZZPacLTYeCHfJbYQwJ9ks5tDIAPgaJpZM4RJRfz&data=02|01||e25533207c5c453e2c1608d549bcce58|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636495997614563275&sdata=rHocqYDmr4MTvtwa00xdsWdRnZhAwfpf4Y9MFeSYwf4%3D&reserved=0.