diff --git a/bin/rstack-business.js b/bin/rstack-business.js index a849b06..2482a59 100644 --- a/bin/rstack-business.js +++ b/bin/rstack-business.js @@ -14,7 +14,7 @@ */ import { createRequire } from 'node:module'; -import { fileURLToPath } from 'node:url'; +import { fileURLToPath, pathToFileURL } from 'node:url'; import path from 'node:path'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -64,7 +64,7 @@ if (args.includes('--version') || args.includes('-v')) { } const serverPath = path.resolve(__dirname, '../src/observability/dashboard/server.js'); -import(serverPath).catch((err) => { +import(pathToFileURL(serverPath).href).catch((err) => { console.error(`[rstack-business] Failed to start: ${err.message}`); console.error(err); process.exit(1); diff --git a/bin/rstack-observer.js b/bin/rstack-observer.js index a670c32..1395de4 100644 --- a/bin/rstack-observer.js +++ b/bin/rstack-observer.js @@ -7,7 +7,7 @@ * scripts, and muscle memory land on the single supported dashboard. */ -import { fileURLToPath } from 'node:url'; +import { fileURLToPath, pathToFileURL } from 'node:url'; import path from 'node:path'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -23,7 +23,7 @@ for (let i = 0; i < process.argv.length; i++) { process.stderr.write('[rstack] rstack-observer now opens the unified Business Hub. Use rstack-business for new scripts.\n'); -import(serverPath).catch((err) => { +import(pathToFileURL(serverPath).href).catch((err) => { console.error(`[rstack-observer] Failed to start unified dashboard: ${err.message}`); console.error(err); process.exit(1);