mosaic doctor fails with ERR_PACKAGE_PATH_NOT_EXPORTED fallback miss #383
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
mosaic doctor(and all framework-delegated subcommands: init, upgrade, projects, orchestrator-*, etc.) fail on globally-installed CLI with:Root cause
resolveTool()inpackages/mosaic/src/commands/launch.tscallsreq.resolve('@mosaic/mosaic/package.json')to locate the bundledframework/tools/directory. The publishedpackage.jsononly exports the.subpath, so Node throwsERR_PACKAGE_PATH_NOT_EXPORTED. The barecatch {}swallows the error silently and falls back to$MOSAIC_HOME/tools/_scripts/…, which does not exist on the user's machine.Fix
fileURLToPath(import.meta.url)(exports-field independent)./package.jsonand./framework/*subpath exports (belt-and-suspenders)@mosaic/mosaic0.0.17 → 0.0.18Branch:
fix/mosaic-doctor-script-resolution