diff --git a/src/commands/create/handlers/LibrarySetup.handler.ts b/src/commands/create/handlers/LibrarySetup.handler.ts index 5205101..429050c 100644 --- a/src/commands/create/handlers/LibrarySetup.handler.ts +++ b/src/commands/create/handlers/LibrarySetup.handler.ts @@ -1,5 +1,6 @@ import path from 'path'; import fs from 'fs/promises'; +import * as URL from 'url'; import { copy } from 'fs-extra/esm'; import chalk from 'chalk'; @@ -52,7 +53,9 @@ export class LibrarySetupHandler extends BaseCommandHandler try { const initImport = await import( - path.join(templatesDir(), this.libraryType, this.libraryName, SCRIPTS_DIR_NAME, scriptName), + URL.pathToFileURL( + path.join(templatesDir(), this.libraryType, this.libraryName, SCRIPTS_DIR_NAME, scriptName), + ).toString() ); if (initImport?.default) {