Nativescript-angular: ActionBarComponent is not exported from @nativescript/angular/nativescript.module

Created on 30 Oct 2020  路  3Comments  路  Source: NativeScript/nativescript-angular

Environment

  • CLI: 7.0.11
  • Cross-platform modules: 7.0.13
  • Android Runtime: 7.0.0
  • NativeScript-Angular: 10.1.7
  • Angular: 10.1.6, 10.2.1

Describe the bug

When I'm running tns debug android --no-hmr I get this error:

ERROR in Symbol ActionBarComponent declared in ./node_modules/@nativescript/angular/directives/action-bar.d.ts is not exported from @nativescript/angular/nativescript.module

Additional context

I'm trying to upgrade code-sharing project from NS 6 and Angular 8

Most helpful comment

I solved this by changing the import in app.module.tns.ts from:

import { NativeScriptModule } from 'nativescript-angular/nativescript.module';

to

import { NativeScriptModule } from "@nativescript/angular";

All 3 comments

I get the same error when building for iOS, also upgrading to NS 7 and Angular 10

I solved this by changing the import in app.module.tns.ts from:

import { NativeScriptModule } from 'nativescript-angular/nativescript.module';

to

import { NativeScriptModule } from "@nativescript/angular";

Thanks @lviss !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

triniwiz picture triniwiz  路  3Comments

okmttdhr picture okmttdhr  路  3Comments

samuelvisscher picture samuelvisscher  路  3Comments

sarvagayatri picture sarvagayatri  路  3Comments

igorls picture igorls  路  3Comments