diff --git a/packages/compartment-mapper/src/bundle.js b/packages/compartment-mapper/src/bundle.js index 68adc32d21..c4b540e78d 100644 --- a/packages/compartment-mapper/src/bundle.js +++ b/packages/compartment-mapper/src/bundle.js @@ -113,8 +113,14 @@ const sortedModules = ( const source = compartmentSources[compartmentName][moduleSpecifier]; if (source !== undefined) { const { record, parser, deferredError, bytes } = source; - assert(parser !== undefined); - assert(bytes !== undefined); + assert( + bytes !== undefined, + `No bytes for ${moduleSpecifier} in ${compartmentName}`, + ); + assert( + parser !== undefined, + `No parser for ${moduleSpecifier} in ${compartmentName}`, + ); if (deferredError) { throw Error( `Cannot bundle: encountered deferredError ${deferredError}`,