You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
I've encountered this problem and it took me a long time to work out.
I've a WebView in my application, during development running with tns run android everything worked fine.
But the moment I tried to run the project with bundling I got an error like this:
Stacktrace:
JS: TypeError: Could not load view for: webview.Error: Cannot find module "ui/web-view"
JS: at Object.getViewClass (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:51335:15)
JS: at ViewUtil.module.exports.ViewUtil.createView (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:52819:48)
JS: at NativeScriptRenderer.module.exports.NativeScriptRenderer.createElement (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:52092:30)
JS: at Object.createRenderElement (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:10223:40)
JS: at View_AppComponent0.module.exports.webpackJsonp.400.View_AppComponent0.createInternal (file:///data/data/org.nativescript.myhalloworld/files/app/bundle.js:477:111)
JS: at View_AppComponent0.module.exports.AppView.create (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:32518:21)
JS: at View_AppComponent_Host0.module.exports.webpackJsonp.400.View_AppComponent_Host0.createInternal (file:///data/data/org.nativescript.myhalloworld/files/app/bundle.js:428:25)
JS: at View_AppComponent_Host0.module.exports.AppView.createHostView (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:32531:21)
JS: at ComponentFactory.module.exports.ComponentFactory.create (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:15767:25)
JS: at ApplicationRef_.module.exports.ApplicationRef_.bootstrap (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:20718:57)
After a lot of hard work I found that it was caused by me writing the tagname in all lowercase like this:
I've encountered this problem and it took me a long time to work out.
I've a
WebView
in my application, during development running withtns run android
everything worked fine.But the moment I tried to run the project with bundling I got an error like this:
Stacktrace:
JS: TypeError: Could not load view for: webview.Error: Cannot find module "ui/web-view" JS: at Object.getViewClass (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:51335:15) JS: at ViewUtil.module.exports.ViewUtil.createView (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:52819:48) JS: at NativeScriptRenderer.module.exports.NativeScriptRenderer.createElement (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:52092:30) JS: at Object.createRenderElement (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:10223:40) JS: at View_AppComponent0.module.exports.webpackJsonp.400.View_AppComponent0.createInternal (file:///data/data/org.nativescript.myhalloworld/files/app/bundle.js:477:111) JS: at View_AppComponent0.module.exports.AppView.create (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:32518:21) JS: at View_AppComponent_Host0.module.exports.webpackJsonp.400.View_AppComponent_Host0.createInternal (file:///data/data/org.nativescript.myhalloworld/files/app/bundle.js:428:25) JS: at View_AppComponent_Host0.module.exports.AppView.createHostView (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:32531:21) JS: at ComponentFactory.module.exports.ComponentFactory.create (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:15767:25) JS: at ApplicationRef_.module.exports.ApplicationRef_.bootstrap (file:///data/data/org.nativescript.myhalloworld/files/app/vendor.js:20718:57)
After a lot of hard work I found that it was caused by me writing the
tagname
in all lowercase like this:But all these cases works as expected:
Example here:
https://github.com/m-abs/tns-webpack-ng2.3/tree/bundle-tag-casing
Steps to reproduce:
npm i
npm run start.android.bundle
This app should crash with the error above, but if you try this:
rm -rf platforms
tns run android
It should show the
WebView
as expected.It would be great if both
tns run android/ios
andnpm run start.android.bundle
behaved the same here, so all four cases would work the same in both.The text was updated successfully, but these errors were encountered: