Nativescript-angular: Not all modules from @nativescript/angular are exported to nativescript-angular

Created on 8 Nov 2019  路  4Comments  路  Source: NativeScript/nativescript-angular

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.2.0
  • Cross-platform modules: 6.2.0
  • Android Runtime: 6.2.0
  • iOS Runtime: 6.2.0
  • Plugin(s):
  • NativeScript-Angular: 8.20.1-rc-2019-11-08-175723-01
  • Angular: 8.2.0

Describe the bug

Modules like @nativescript/angular/app-host-view, @nativescript/angular/common/detached-loader, and @nativescript/angular/common/utils are not exported to nativescript-angular, this causes backwards incompatibility with some plugins.

To Reproduce

require("nativescript-angular/common/utils");

Causes the following error:

Module not found: Error: Can't resolve 'nativescript-angular/common/utils'

Expected behavior

nativescript-angular should export all modules from @nativescript/angular to keep backward compatibility.

Sample project

Additional context

Most helpful comment

@tbozhikov nativescript-material-bottomsheet is the only plugin I've found to be broken so far

All 4 comments

Hi @mukaschultze, thanks for reporting this. We are preparing a patch addressing this breaking change. Meanwhile, could you please share the plugins you've found broken by this? Thanks!

@tbozhikov nativescript-material-bottomsheet is the only plugin I've found to be broken so far

nativescript-masked-textfield is also broken. it looks for _nativescript-angular/forms/value-accessors/text-value-accessor_ which is missing from nativescript-angular package.

The Jasmine import is also to be corrected.

The file zone-js/testing.jasmine.ts seems to point to the wrong location:

require("@nativescript/angular/dist/zone-nativescript.jasmine.js");

This should actually be @nativescript/angular/zone-js/dist/zone-nativescript.jasmine.js.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tsonevn picture tsonevn  路  33Comments

ignaciofuentes picture ignaciofuentes  路  31Comments

jlooper picture jlooper  路  57Comments

codeback picture codeback  路  34Comments

tsonevn picture tsonevn  路  27Comments