question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin with Ionic

See original GitHub issue

Hi

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:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aardrasystemscommented, Mar 16, 2021

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.

0reactions
aardrasystemscommented, Jul 5, 2021

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 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Native APIs - Ionic Framework
Build native-powered app experiences with Native APIs. Ionic's open-source plugins and integrations make it easy to add native device functionality to any app....
Read more >
Supported Plugins - Ionic.io
Supported Plugins are a library of fully supported Capacitor and Cordova plugins and third-party integrations for teams building enterprise-grade apps with ...
Read more >
Using Cordova Plugins and Ionic Native - Capacitor
Using Cordova Plugins and Ionic Native. When developing an app that uses Capacitor, it's possible to use both Cordova and Ionic Native plugins....
Read more >
How to Build Your Own Capacitor Plugin for Ionic - Devdactic
Android: The native implementation of the plugin for Android · dist: The build output folder which is used on the web · ios:...
Read more >
cordova-plugin-ionic - npm
Ionic Cordova SDK. Latest version: 5.5.3, last published: 3 months ago. Start using cordova-plugin-ionic in your project by running `npm i ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found