离子电容器:错误:未在网络上实现

Rap*_*let 3 cordova ionic-framework capacitor

从 迁移cordova到后capacitor,我在运行时收到以下错误ionic s

错误

vendor.js:114293 ERROR Error: Uncaught (in promise): Error: Not implemented on web.
Error: Not implemented on web.
    at AppWeb.unimplemented (vendor.js:1941:12)
    at node_modules_capacitor_app_dist_esm_web_js.js:40:19
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (vendor.js:234184:24)
    at _next (vendor.js:234206:9)
    at vendor.js:234213:7
    at new ZoneAwarePromise (polyfills.js:9384:21)
    at vendor.js:234202:12
    at AppWeb.getInfo (node_modules_capacitor_app_dist_esm_web_js.js:41:7)
    at vendor.js:1704:23
    at resolvePromise (polyfills.js:9124:19)
    at polyfills.js:9019:9
    at polyfills.js:9036:25
    at rejected (vendor.js:67367:89)
    at _ZoneDelegate.invoke (polyfills.js:8112:158)
    at Object.onInvoke (vendor.js:136063:25)
    at _ZoneDelegate.invoke (polyfills.js:8112:46)
    at Zone.run (polyfills.js:7853:35)
    at polyfills.js:9197:28
    at _ZoneDelegate.invokeTask (polyfills.js:8145:171)
Run Code Online (Sandbox Code Playgroud)

有人知道我错过了什么吗?

RGe*_*RGe 8

您调用了 Web 平台不支持的插件方法(仅在 Android 和/或 iOS 上)。使用 Capacitor.isNativePlatform() 检查是否可以调用插件方法。