Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyNodeJSCommonJS vs ES modulesSingle-choice MCQ

Why is it a known gotcha to use ES module `import` and CommonJS `require` for the same dependency, like this?

import fs from 'fs'; const path = require('path');