Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nativescript platform specific components won't build #297

Open
mohammadrafigh opened this issue Jan 22, 2022 · 0 comments
Open

Nativescript platform specific components won't build #297

mohammadrafigh opened this issue Jan 22, 2022 · 0 comments

Comments

@mohammadrafigh
Copy link

I have an Angular component in a Nativescript project (located at libs/xplat/nativescript/features/src/lib/ui/components) which has 2 implementations for Android and iOS and both extend a base component in the same directory. I also defined a .d.ts file. So the component directory includes:

my-component.base-component.ts
my-component.component.android.ts
my-component.component.ios.ts
my-component.component.d.ts
my-component.component.html

The build fails with this error:

my-component.component.android.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

Adding the **/*.android.ts, **/*.ios.ts and **/*.d.ts in tsconfig.lib.json doesn't have any effect. But adding ../../**/*.android.ts, ../../**/*.ios.ts and ../../**/*.d.ts in tsconfig..app.json fixes that error but generates more errors:

'AbsoluteLayout' is not a known element

The component is declared in the UI module using the .d.ts which imports NativeScriptCommonModule So the AbsoluteLayout should be available.

@mohammadrafigh mohammadrafigh changed the title Nativescript platform specific files won't build Nativescript platform specific components won't build Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant