Skip to content

Importing dependencies into XML not working - Windows 10 #59

Description

@dejanjankovic

This is a Bug Report

Description

  • What went wrong?
  • Did not import the dependencies from .brs into XML
  • What did you expect should have happened?
  • It should add .brs dependencies into XML
  • What was the config (if any) you used?
  • Standard kopytko-cli template.
  • What stacktrace or error message did you see?
  • Details:
    On Linux:
<component name="AppView" extends="KopytkoGroup">
  <script type="text/brightscript" uri="App.template.brs" />
  <script type="text/brightscript" uri="App.view.brs" />

  <!-- auto-imported sub-dependencies -->
  <script type="text/brightscript" uri="pkg:/components/App.routing.brs" />
  <script type="text/brightscript" uri="pkg:/components/App.theme.brs" />
  <script type="text/brightscript" uri="pkg:/components/kopytko_modules/dazn_kopytkoFramework_v1/router/Router.facade.brs" />
  <script type="text/brightscript" uri="pkg:/components/kopytko_modules/dazn_kopytkoFramework_v1/store/Store.facade.brs" />
  <script type="text/brightscript" uri="pkg:/components/kopytko_modules/dazn_kopytkoFramework_v1/theme/Theme.facade.brs" />
  <script type="text/brightscript" uri="pkg:/components/kopytko_modules/dazn_kopytkoFramework_v1/utils/KopytkoGlobalNode.brs" />
  <script type="text/brightscript" uri="pkg:/components/kopytko_modules/dazn_kopytkoUtils_v2/getType.brs" />
  <script type="text/brightscript" uri="pkg:/components/kopytko_modules/dazn_kopytkoUtils_v2/ternary.brs" />
</component>

On Windows:

<component name="AppView" extends="KopytkoGroup">
  <script type="text/brightscript" uri="App.template.brs" />
  <script type="text/brightscript" uri="App.view.brs" />
</component>
  • Possible issue: You are using the node path.join when you are doing the logic for the dependencies finder and "pkg:" path creation. The issue is that the pkg: path is the same on Windows like on the Linux. It is using forward slashes for pkg: on Windows too. With node path.join on Windows you are getting wrong paths for pkg: E.g. pkg:\\undefined\\koptyko_modules...
  • The undefined in the path is also because of the path.env for Windows is set to the \\ and the path that is checked is actually with forward slashes e.g. components/Assert.brs.

Similar or dependent issues:
*

Additional Data

  • Which version of node and npm are you using?: 17.5.0 and 8.5.4
  • Operating System: Windows 10 64
  • Stack Trace:
  • Provider Error messages:

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