Skip to content

Not all modules from @nativescript/angular are exported to nativescript-angular #2059

Open

Description

@mukaschultze

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

Activity

  1. tbozhikov commented on Nov 12, 2019

    @tbozhikov
    Contributor

    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!

  2. mukaschultze commented on Nov 12, 2019

    @mukaschultze
    Author

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

  3. atchaiecommerce commented on Nov 13, 2019

    @atchaiecommerce

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

  4. NickIliev commented on Dec 13, 2019

    @NickIliev

    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.

  5. added a commit that references this issue on Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions