Skip to content

TNS7 CLI pulls TNS 8 Templates, causing broken builds #5515

Closed
@NathanaelA

Description

@NathanaelA

Environment

  • CLI: 7.2.1

Describe the bug
If you do a tns create test (only tested js, ng, and vue -- probably happens with any flavor), it will pull the TNS 8 template which has the all new cool webpack config which unfortunately does not work with the webpack that TNS 7 is looking for as the cli passed to it is different.

Error reported is:

Preparing project...
[webpack-cli] Error: Unknown option '--env.externals=~/package.json'

To Reproduce
tns create test --js or tns create test --vue or tns create test --ng

Expected behavior
tns v7 should only pull a v7 template. (Tested: Tns v6 properly pulls only a v6 template).

Workaround
You can do a tns create test --template @nativescript/template-hello-world@7.0.4 to pull the latest 7.0 blank JS template. So if you lookup on npmjs you can find the latest 7.x template for tns7.

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