Notalib/nativescript-webview-ext

Could not load view for: nativewebviewext

donmb1 opened this issue · 3 comments

Make sure to check the demo app(s) for sample usage

Checked

Make sure to check the existing issues in this repository

Checked
This is what I found but it didn't solve the problem for me: #96

If the demo apps cannot help and there is no issue for your problem, tell us about it

I get this error when running tns preview

2021-02-03 11:44:25.586 nsplaydev[16102:6711270] JavaScript error:
file:///app/tns_modules/nativescript-vue/dist/index.js:9186:80: JS ERROR TypeError: Could not load view for: nativewebviewext. TypeError: undefined is not a constructor (evaluating 'new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Property"]')
2021-02-03 11:44:25.587 nsplaydev[16102:6711270] PlayLiveSync: Uncaught Exception
2021-02-03 11:44:25.587 nsplaydev[16102:6711270] *** JavaScript call stack:
(
	0   UIApplicationMain@[native code]
	1   run@file:///app/tns_modules/@nativescript/core/application/application.js:312:26
	2   @file:///app/tns_modules/nativescript-vue/dist/index.js:14069:18
	3   @file:///app/vendor.js:8021:25
	4   @file:///app/bundle.js:313:10
	5   ./main.js@file:///app/bundle.js:317:34
	6   __webpack_require__@file:///app/runtime.js:817:34
	7   checkDeferredModules@file:///app/runtime.js:44:42
	8   webpackJsonpCallback@file:///app/runtime.js:31:39
	9   anonymous@file:///app/bundle.js:2:61
	10  evaluate@[native code]
	11  moduleEvaluation@:1:11
	12  @:2:1
	13  asyncFunctionResume@:1:11
	14  @:24:9
	15  promiseReactionJob@:1:11
)
2021-02-03 11:44:25.587 nsplaydev[16102:6711270] *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: TypeError: Could not load view for: nativewebviewext. TypeError: undefined is not a constructor (evaluating 'new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Property"]')
 at 
getViewClass(file:///app/tns_modules/nativescript-vue/dist/index.js:9186:80)

Which platform(s) does your issue occur on?

  • iOS
  • iOS 14.3
  • emulator or device. What type of device? Which modal of device?
  • via tns preview

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

  • CLI: (run tns --version to fetch it) 7.1.1-2020-12-30-212904-14318
  • iOS: XCode version. Version 12.4 (12D4e)
  • nodejs: (run node --version to fetch it) v14.15.0
  • tns-core-modules: (run npm ls tns-core-modules in your project to fetch it.) ── (empty)
  • Runtime(s): (look for the "tns-android" and "tns-ios" properties in the package.json file of your project)
  • Plugin(s): (look for the version numbers in the package.json file of your
    project and paste your dependencies and devDependencies here)

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

My main.js

Vue.registerElement("WebViewExt", () => require("@nota/nativescript-webview-ext").WebViewExt)

My App.vue

<WebViewExt
    src="......"
/>

Is there any code involved?

See above, this is all code involved

Just a quick follow up if anyone can help me here?
Thank you

m-abs commented

As far as I understand it, you can't use custom plugins with tns preview, I'm guessing that's why it isn't working for you.

Ahh that would make sense. Thanks for clarification.