Baileys
Baileys copied to clipboard
adding @adiwajshing/keyed-db to dependencies
throws error
node_modules/.pnpm/@[email protected]_a9c255cd4f7c72f8caee0a723a9801d6/node_modules/@whiskeysockets/baileys/lib/Store/make-in-memory-store.d.ts:1:21 - error TS2307: Cannot find module '@adiwajshing/keyed-db' or its corresponding type declarations.
1 import KeyedDB from '@adiwajshing/keyed-db';
if it's not installed
Thanks for your contribution.
The next step is to wait for review and approval to merge it to main repository
The community can help reacting with a thumb up (:thumbsup:) for approval and rocket (:rocket:) for who has tested it.
To test this PR you can run the following command below:
# NPM
npm install @whiskeysockets/baileys@OSintt/Baileys#patch-1
# YARN v2
yarn add @whiskeysockets/baileys@OSintt/Baileys#patch-1
This will help a lot of people asking in discord how to solve it... but it is a dependency just for who uses inMemoryStore.
Everyone can solve it quickly... but so much people that do not even know js/ts wants to use Baileys....
Maybe upgrading the docs helps too.
If aproved, maybe you can remove it from devDependencies
This pull request is unnecessary, because basically not everyone uses the store and needs @adiwajshing/keyed-db
. And for the error you mentioned, it has been fixed in commit 6ed9298d960c2a14eeaa7b42206119a6693857fd
I am favor to put it as a direct dependency, because the lib offer a function that is a dependent
@zennn08 with all respect, but your PR does not fix "Cannot find module '@adiwajshing/keyed-db'". Only thing that fix it, is installing the package. I agree with @edgardmessias. And it will save a lot of reading time in discord about this problem. But the right is "Migrating @adiwajshing/keyed-db to dependencies"...
it's ok, I'm just expressing my opinion, the decision rests with the repository owner