NativeScript / NativeScript

⚡ Empowering JavaScript with native platform APIs. ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love ❤️ Angular, Capacitor, Ionic, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android (View, Jetpack Compose), Dart (Flutter) and you name it compatible.
https://nativescript.org
MIT License
24.26k stars 1.64k forks source link

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

Closed AshleyCao closed 6 years ago

AshleyCao commented 6 years ago

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.

tsonevn commented 6 years ago

This issue was moved to telerik/nativescript-ui-feedback#664

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.