【发布时间】:2019-05-26 13:08:00
【问题描述】:
我正在开发一个 sma pwa 并想使用条形码扫描仪,遵循此文档 https://beta.ionicframework.com/docs/native/barcode-scanner/,我在 chrome 上收到此错误:
Uncaught TypeError: Object(...) is not a function 在 vendor.js:90632 在 Module../node_modules/@ionic-native/barcode-scanner/index.js (vendor.js:90681)
我正在与 离子 4.6.0,角度 7.0.4 使用 ionic build 和 ionic serve 它构建,但在浏览器中出现错误, ionic build --prod 给了我:
../@ionic-native/barcode-scanner/index.ts(104,2) 中的错误:“BarcodeScanner”模板编译期间出错 装饰器中只能引用已初始化的变量和常量,因为“插件”中的模板编译器需要此变量的值 “插件”引用“插件” “插件”未在 ../@ionic-native/core/decorators/interfaces.ts(100,22) 处初始化。
我被卡住了。
【问题讨论】:
标签: angular cordova ionic-framework barcode-scanner ionic-native