web-bluetooth dependency should be transitive
See original GitHub issueDescribe the bug
Without "@types/web-bluetooth": "0.0.14",
in my devDependencies
the build fails with:
.....
node_modules/@vueuse/core/index.d.ts:396:32 - error TS2304: Cannot find name 'BluetoothDevice'.
396 onserviceadded: (this: BluetoothDevice, ev: Event) => any;
~~~~~~~~~~~~~~~
node_modules/@vueuse/core/index.d.ts:397:34 - error TS2304: Cannot find name 'BluetoothDevice'.
397 onservicechanged: (this: BluetoothDevice, ev: Event) => any;
~~~~~~~~~~~~~~~
node_modules/@vueuse/core/index.d.ts:398:34 - error TS2304: Cannot find name 'BluetoothDevice'.
398 onserviceremoved: (this: BluetoothDevice, ev: Event) => any;
~~~~~~~~~~~~~~~
node_modules/@vueuse/core/index.d.ts:401:26 - error TS2304: Cannot find name 'BluetoothRemoteGATTServer'.
401 server: vue_demi.Ref<BluetoothRemoteGATTServer | undefined>;
~~~~~~~~~~~~~~~~~~~~~~~~~
Project uses TypeScript.
System Info
System:
OS: Windows 10 10.0.19044
CPU: (12) x64 Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
Memory: 13.45 GB / 31.73 GB
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 3.1.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.12.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (102.0.1245.44)
Internet Explorer: 11.0.19041.1566
npmPackages:
@vueuse/core: 8.7.4 => 8.7.4
vue: 3.2.37 => 3.2.37
Used Package Manager
yarn
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a VueUse issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:8 (1 by maintainers)
Top Results From Across the Web
1296535 - Comment Keyboard shortcut not working correctly ...
which was released as part of `@lezer/html`, which is a transitive dependency. Therefore, executing `rebuild.sh` pulls in the fix.
Read more >Web Bluetooth API - MDN Web Docs
The Web Bluetooth API provides the ability to connect and interact with Bluetooth Low Energy peripherals.
Read more >Transitive dependency in DBMS - Tutorialspoint
When an indirect relationship causes functional dependency it is called Transitive Dependency. If P -> Q and Q -> R is true, then...
Read more >Web-Bluetooth API, can not update characteristics. time ...
You missed a characteristic.startNotifications() call to start receive notification. example; setInterval would be fine to call readValue() ...
Read more >WebBluetooth in Servo
In particular, the Web Bluetooth API focuses on minimizing the device attack surface ... The platform dependent code can be found in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any updates on this? In “@vueuse/core”: “^9.1.0” I still see the error.
I was able to mitigate it by installing “@types/web-bluetooth” and adding “web-bluetooth” to “compilerOptions.types” in tsconfig.json, but it is a bit annoying to have this kind of workaround, since most users very likely are not using bluetooth features of the lib at all. Maybe this could become a separate package?
Seems it’s not solved via
v8.7.5
🙁