ionic native barcodescanner 不工作
ionic native barcodescanner does not work
我正在开发一个 sma pwa 并想使用条形码扫描器,按照这个文档 https://beta.ionicframework.com/docs/native/barcode-scanner/,我在 chrome 上收到这个错误:
Uncaught TypeError: Object(...) is not a function
at vendor.js:90632
at Module../node_modules/@ionic-native/barcode-scanner/index.js (vendor.js:90681)
我正在与
离子 4.6.0,Angular7.0.4
使用 ionic build 和 ionic serve 构建,但在浏览器中出现错误,ionic build --prod 给我:
ERROR in ../@ionic-native/barcode-scanner/index.ts(104,2): Error during template compile of 'BarcodeScanner'
Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler in 'Plugin'
'Plugin' references 'Plugin'
'Plugin' is not initialized at ../@ionic-native/core/decorators/interfaces.ts(100,22).
我卡住了。
试试这些 instructions,它使用用于 ionic 4 的条形码扫描器的测试版实现,对我有用。
我正在开发一个 sma pwa 并想使用条形码扫描器,按照这个文档 https://beta.ionicframework.com/docs/native/barcode-scanner/,我在 chrome 上收到这个错误:
Uncaught TypeError: Object(...) is not a function at vendor.js:90632 at Module../node_modules/@ionic-native/barcode-scanner/index.js (vendor.js:90681)
我正在与 离子 4.6.0,Angular7.0.4 使用 ionic build 和 ionic serve 构建,但在浏览器中出现错误,ionic build --prod 给我:
ERROR in ../@ionic-native/barcode-scanner/index.ts(104,2): Error during template compile of 'BarcodeScanner' Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler in 'Plugin' 'Plugin' references 'Plugin' 'Plugin' is not initialized at ../@ionic-native/core/decorators/interfaces.ts(100,22).
我卡住了。
试试这些 instructions,它使用用于 ionic 4 的条形码扫描器的测试版实现,对我有用。