代码之家  ›  专栏  ›  技术社区  ›  Raphaël Balet

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

  •  0
  • Raphaël Balet  · 技术社区  · 2 年前

    从执行迁移后 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)
    

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

    0 回复  |  直到 2 年前
        1
  •  3
  •   RGe    2 年前

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