diff --git a/client/utils/buildChallenges.js b/client/utils/buildChallenges.js index c704a5f1db..b16d445914 100644 --- a/client/utils/buildChallenges.js +++ b/client/utils/buildChallenges.js @@ -17,7 +17,8 @@ exports.replaceChallengeNode = () => { return async function replaceChallengeNode(filePath) { // get the meta so that challengeOrder is accurate const blockNameRe = /\d\d-[-\w]+\/([^/]+)\//; - const blockName = filePath.match(blockNameRe)[1]; + const posix = path.normalize(filePath).split(path.sep).join(path.posix.sep); + const blockName = posix.match(blockNameRe)[1]; const metaPath = path.resolve( __dirname, `../../curriculum/challenges/_meta/${blockName}/meta.json`