Browse Source

chore(core): Fix TS compiler error

Michael Bromley 3 years ago
parent
commit
b5da9d9521
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/core/src/cli/populate.ts

+ 2 - 1
packages/core/src/cli/populate.ts

@@ -1,6 +1,7 @@
 import { INestApplicationContext } from '@nestjs/common';
 import { INestApplicationContext } from '@nestjs/common';
 import fs from 'fs-extra';
 import fs from 'fs-extra';
 import path from 'path';
 import path from 'path';
+import { lastValueFrom } from 'rxjs';
 
 
 import { logColored } from './cli-utils';
 import { logColored } from './cli-utils';
 
 
@@ -92,5 +93,5 @@ export async function importProductsFromCsv(
     const importer = app.get(Importer);
     const importer = app.get(Importer);
     const productData = await fs.readFile(productsCsvPath, 'utf-8');
     const productData = await fs.readFile(productsCsvPath, 'utf-8');
 
 
-    return importer.parseAndImport(productData, languageCode, true).toPromise();
+    return lastValueFrom(importer.parseAndImport(productData, languageCode, true));
 }
 }