Plugin with Ionic
See original GitHub issueHi
I am very new to Capacitor plugins.
I am trying to install this plugin into my Ionic project so that I can use BLE on all platforms.
I have managed to install its as shown in the guide, but when I do a build I am getting the following error messages:
Can you please advice what I am doing wrong?
` ERROR in node_modules/@capacitor-community/bluetooth-le/dist/esm/definitions.d.ts:1:13 - error TS1005: ‘=’ expected.
1 import type { PluginListenerHandle } from ‘@capacitor/core’; ~ node_modules/@capacitor-community/bluetooth-le/dist/esm/definitions.d.ts:1:43 - error TS1005: ‘;’ expected.
1 import type { PluginListenerHandle } from ‘@capacitor/core’; ~~~~~~~~~~~~~~~~~ node_modules/@capacitor-community/bluetooth-le/dist/esm/web.d.ts:3:13 - error TS1005: ‘=’ expected.
3 import type { BleDevice, BluetoothLePlugin, ConnectOptions, ReadOptions, ReadResult, RequestBleDeviceOptions, WriteOptions } from ‘./definitions’; ~ node_modules/@capacitor-community/bluetooth-le/dist/esm/web.d.ts:3:131 - error TS1005: ‘;’ expected.
3 import type { BleDevice, BluetoothLePlugin, ConnectOptions, ReadOptions, ReadResult, RequestBleDeviceOptions, WriteOptions } from ‘./definitions’; ~~~~~~~~~~~~~~~ node_modules/@capacitor-community/bluetooth-le/dist/esm/bleClient.d.ts:1:13 - error TS1005: ‘=’ expected.
1 import type { PluginListenerHandle } from ‘@capacitor/core’; ~ node_modules/@capacitor-community/bluetooth-le/dist/esm/bleClient.d.ts:1:43 - error TS1005: ‘;’ expected.
1 import type { PluginListenerHandle } from ‘@capacitor/core’; ~~~~~~~~~~~~~~~~~ node_modules/@capacitor-community/bluetooth-le/dist/esm/bleClient.d.ts:2:13 - error TS1005: ‘=’ expected.
2 import type { BleDevice, RequestBleDeviceOptions, ScanResult } from ‘./definitions’; ~ node_modules/@capacitor-community/bluetooth-le/dist/esm/bleClient.d.ts:2:69 - error TS1005: ‘;’ expected.
2 import type { BleDevice, RequestBleDeviceOptions, ScanResult } from ‘./definitions’; ~~~~~~~~~~~~~~~
[ERROR] An error occurred while running subprocess ng. `
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
I managed to get typescript 3.8.3 installed and the errors seems to have gone. I will now progress with the plugin and see if I can get it working.
Hi
I update my Angular version, and it seems to solve the issue.
When I use the plugin on an Ios device, it seems like BLE is not recognized. Must I enable anything additional on Xcode or in my code?
Best Regards
Dharmesh Joshi
http://www.aardra.co.uk www.aardra.co.uk
From: pwespi @.> Sent: 03 July 2021 11:30 To: capacitor-community/bluetooth-le @.> Cc: aardrasystems @.>; Author @.> Subject: Re: [capacitor-community/bluetooth-le] Plugin with Ionic (#69)
I have just tested using the plugin with TypeScript 3.7 and 3.8 and didn’t have any issues. Generally I’m using TypeScript 4.x.
It seems like the problem is between TypeScript and Angular.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/capacitor-community/bluetooth-le/issues/69#issuecomment-873384319 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALXKYEIRG6NQVBBEK5FLY4DTV3RC7ANCNFSM4ZIMPNNQ .