FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Developer workflow broken when linking plain JS app with NativeScript/tns-core-modules · Issue #7942 · NativeScript/NativeScript · GitHub

Repository navigation

Developer workflow broken when linking plain JS app with NativeScript/tns-core-modules #7942

Description

Environment

  • CLI: 6.1.2
  • Cross-platform modules: master (6.2.0)
  • Android Runtime: 6.1.2
  • iOS Runtime: 6.1.0
  • Plugin(s): N/A

Describe the bug
I’m having problems trying to run the Hello World template app using the NativeScript source as described here

When trying to run the app I get the error attached in the screenshot at the end.

To Reproduce

  1. clone the NativeScript project
  2. tns create test-bkg-pos in the same folder where you cloned NativeScript
  3. npm install --save ../NativeScript/tns-core-modules insede the project folder (i.e: test-bkg-pos)
  4. tns run android

Expected behavior
The project should work using the source code for core modules.

Additional context
Not to flood this issue with a wall of text, I've attached the error as an image. If it turns out the problem is cause by something I did wrong, I'll replace it with the text for others that have the same issue to find this.

Activity

  1. NickIliev commented on Oct 11, 2019

    Contributor

    Confirming the issue as reproducible when using plain JavaScript project.

    Steps to reproduce: use the workflow described by @surdu above.

  2. changed the title [-]Error when runing android app with NativeScritp source code[/-] [+]Developer workflow broken when linking plain JS app with NativeScript/tns-core-modules[/+] on Oct 11, 2019
  3. surdu commented on Oct 11, 2019

    ContributorAuthor
  4. NickIliev commented on Oct 11, 2019

    Contributor

    @surdu the thing is that the project you are using is plain JavaScript while the NativeScript/tns-core-modules (cloned from the repo) are written in TypeScript. So you need to transpile the tns-core-modules so that your plain JS project will have the transpiled JS files.

    in NativeScript repository run

    tsc
    

    and then rebuild the test project you are good to go. The downside is that you will have to transpile the modules after each code change (in tns-core-modules). Or use tsc -w .

    Another option is to grab the tsconfig.json from a TypeScript project and use it in your plain JS project. (but then you should NOT use tsc -w as it will conflict with the Webpack transpiling)

  5. surdu commented on Oct 14, 2019

    ContributorAuthor

    D'oh! Makes perfect sense! Thank you! I'll update the docs with this info.

  6. vakrilov commented on Oct 17, 2019

    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL