diff --git a/.changeset/mighty-lamps-cross.md b/.changeset/mighty-lamps-cross.md new file mode 100644 index 0000000000..af09263f2e --- /dev/null +++ b/.changeset/mighty-lamps-cross.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Fixed backend start command on Windows by removing the use of platform dependent path joins. diff --git a/packages/cli/src/lib/bundler/config.ts b/packages/cli/src/lib/bundler/config.ts index 01f323a082..6fc7482dce 100644 --- a/packages/cli/src/lib/bundler/config.ts +++ b/packages/cli/src/lib/bundler/config.ts @@ -15,7 +15,7 @@ */ import fs from 'fs-extra'; -import { resolve as resolvePath, join as joinPath } from 'path'; +import { resolve as resolvePath, posix as posixPath } from 'path'; import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import ModuleScopePlugin from 'react-dev-utils/ModuleScopePlugin'; @@ -236,7 +236,7 @@ export async function createBackendConfig( const { packages } = await getPackages(cliPaths.targetDir); const localPackageEntryPoints = packages.flatMap(p => { const entryPoints = readEntryPoints((p as ExtendedPackage).packageJson); - return entryPoints.map(e => joinPath(p.packageJson.name, e.mount)); + return entryPoints.map(e => posixPath.join(p.packageJson.name, e.mount)); }); const moduleDirs = packages.map(p => resolvePath(p.dir, 'node_modules')); // See frontend config