ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

Module ../nativescript-ui-listview not found for element 'nativescrit-ui-listview:RadListView' #664

Closed tsonevn closed 6 years ago

tsonevn commented 6 years ago

From @AshleyCao on May 16, 2018 4:21

Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?

Yes.

Tell us about the problem

Can not start app, error info as follow: System.err: Caused by: com.tns.NativeScriptException: System.err: Calling js method onCreate failed System.err: Error: Building UI from XML. @file:///app/./Views/Route/DropSequence.xml:27:11 System.err: > Module '/data/data/org.nativescript.foodService/files/app/tns_modules/nativescript-ui-listview' not found for element 'nativescript-ui-listview:RadListView'. System.err: > Cannot read property 'ListViewAdapter' of undefined System.err: File: "file:///data/data/org.nativescript.foodService/files/app/tns_modules/tns-core-modules/ui/builder/builder.js, line: 238, column: 20

Which platform(s) does your issue occur on?

Android

Please provide the following version numbers that your issue occurs with:

Please tell us how to recreate the issue in as much detail as possible.

Create a new sidedrawer app with sidekick -> integrate files from former project I tried to remove and add platform. No luck

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

Based on #654 ,I modified bundle-config.ts as

require("globals");
const globalAny:any = global;
if ((<any>globalAny).TNS_WEBPACK) {
    // Register tns-core-modules UI framework modules
    require("bundle-entry-points");
    const context = (<any>require).context("~/", true, /(page|fragment)\.(xml|css|js|ts|scss|less|sass)$/);
    globalAny.registerWebpackModules(context);

    // Register application modules
    globalAny.registerModule("nativescript-ui-sidedrawer", () => require("../node_modules/nativescript-ui-sidedrawer"));
    globalAny.registerModule("nativescript-ui-autocomplete", () => require("nativescript-ui-autocomplete"));
    globalAny.registerModule("nativescript-ui-chart", () => require("nativescript-ui-chart"));
    globalAny.registerModule("nativescript-ui-listview", () => require("nativescript-ui-listview"));
    // Register application modules
    // This will register each `root`, `page`, `fragment` postfixed xml, css, js, ts, scss file in the app/ folder

}

Still not working.

Copied from original issue: NativeScript/NativeScript#5822

tsonevn commented 6 years ago

Hi @AshleyCao, Can you provide sample project and info about the exact steps, which you use while building the app?

AshleyCao commented 6 years ago

Hi @tsonevn , I am using sidekick to build( tried cli, no luck) I created a small gist. Original project is pretty big https://gist.github.com/AshleyCao/06742e2dc7a26e62a1df9faf971a70d8

tsonevn commented 6 years ago

HI @AshleyCao, Thank you for the code sample. I tested your case on my side while reusing some parts of the code, however, was unable to recreate the problem. I am attaching sample project, please review it and make the needed changes, which will allow us to recreate the issue. Archive.zip

Thank you in advance for your cooperation.

AshleyCao commented 6 years ago

@tsonevn Thanks for the package. I may mess up my code when I try yo migrate former project ( it was Nativescript 2.0 ish?) to latest version. Thanks for your help.