Skip to content

tools: nx migration defines wrong --output path for node normalize-import #18659

@Hotell

Description

@Hotell

Describe the issue:

output option specifies path that doesn't exist -> node ../../scripts/typescript/normalize-import --output dist/packages/react-menu/src

This might been caused by TS changes as those mechanism have been implemented prior to our TS 4 migration.

With current TS used within our repo tsc -p . --module esnext --emitDeclarationOnly will generate dist/<package-name>/src thus not following the default hierarchy. ( no idea if this was intended breaking change by TS team)

Actual behavior:

migration generates following npm script:
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/packages/react-menu/src && yarn docs",

Which will throw an error
image

Expected behavior:

yarn build:local should work.

Fix ->

-node ../../scripts/typescript/normalize-import --output dist/packages/react-menu/src
+node ../../scripts/typescript/normalize-import --output dist/react-menu/src

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions