diff --git a/.changeset/kind-feet-shake.md b/.changeset/kind-feet-shake.md new file mode 100644 index 0000000000..9afd8791c0 --- /dev/null +++ b/.changeset/kind-feet-shake.md @@ -0,0 +1,5 @@ +--- +"@medusajs/medusa": patch +--- + +Fix logging error when trying to migrate products for enabling inventory module. diff --git a/packages/medusa/src/scripts/migrate-inventory-items.ts b/packages/medusa/src/scripts/migrate-inventory-items.ts index 33574412cc..e14fd9d23c 100644 --- a/packages/medusa/src/scripts/migrate-inventory-items.ts +++ b/packages/medusa/src/scripts/migrate-inventory-items.ts @@ -134,7 +134,7 @@ const migrate = async function ({ directory }) { await processBatch(variants, defaultLocationId, container) let processedCount = variants.length - Logger.log(`Processed ${processedCount} of ${totalCount}`) + Logger.info(`Processed ${processedCount} of ${totalCount}`) while (processedCount < totalCount) { const nextBatch = await variantService.list( {}, @@ -148,10 +148,10 @@ const migrate = async function ({ directory }) { await processBatch(nextBatch, defaultLocationId, container) processedCount += nextBatch.length - Logger.log(`Processed ${processedCount} of ${totalCount}`) + Logger.info(`Processed ${processedCount} of ${totalCount}`) } - Logger.log("Done") + Logger.info("Done") process.exit(0) }