Description
astryx swizzle Button generates this type import:
import type {BaseProps} from '@astryxdesign/core/BaseProps';
However, @astryxdesign/core does not define ./BaseProps in its package.json exports. Node package resolution reports ERR_PACKAGE_PATH_NOT_EXPORTED, and TypeScript reports TS2307.
The generated source should import BaseProps through a public package export. This could be addressed either by changing the swizzle import rewrite or by exporting the ./BaseProps subpath.
Reproduction
-
Create a fresh Next.js 16 application.
-
Install Astryx v0.1.6.
-
Run:
-
Inspect the generated Button source. It imports BaseProps from @astryxdesign/core/BaseProps.
-
Run TypeScript. It reports TS2307 because that subpath is not exported.
The same result was reproduced with v0.1.4.
Workaround
Change only the generated import to the package barrel:
import type {BaseProps} from '@astryxdesign/core';
After this one-line change, TypeScript exits with code 0. The import is type-only, so this workaround does not change runtime behavior.
Astryx Version
@astryxdesign/core@0.1.4 and @astryxdesign/core@0.1.6
Environment
Fresh Next.js 16 application
Description
astryx swizzle Buttongenerates this type import:However,
@astryxdesign/coredoes not define./BasePropsin itspackage.jsonexports. Node package resolution reportsERR_PACKAGE_PATH_NOT_EXPORTED, and TypeScript reportsTS2307.The generated source should import
BasePropsthrough a public package export. This could be addressed either by changing the swizzle import rewrite or by exporting the./BasePropssubpath.Reproduction
Create a fresh Next.js 16 application.
Install Astryx v0.1.6.
Run:
Inspect the generated Button source. It imports
BasePropsfrom@astryxdesign/core/BaseProps.Run TypeScript. It reports
TS2307because that subpath is not exported.The same result was reproduced with v0.1.4.
Workaround
Change only the generated import to the package barrel:
After this one-line change, TypeScript exits with code 0. The import is type-only, so this workaround does not change runtime behavior.
Astryx Version
@astryxdesign/core@0.1.4and@astryxdesign/core@0.1.6Environment
Fresh Next.js 16 application