Baileys icon indicating copy to clipboard operation
Baileys copied to clipboard

adding @adiwajshing/keyed-db to dependencies

Open OSintt opened this issue 1 year ago • 2 comments

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

OSintt avatar Jun 15 '23 15:06 OSintt

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

whiskeysockets-bot avatar Jun 15 '23 15:06 whiskeysockets-bot

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

dudagervasio avatar Jun 15 '23 16:06 dudagervasio

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

zennn08 avatar Jun 15 '23 22:06 zennn08

I am favor to put it as a direct dependency, because the lib offer a function that is a dependent

edgardmessias avatar Jun 16 '23 00:06 edgardmessias

@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"...

dudagervasio avatar Jun 16 '23 02:06 dudagervasio

it's ok, I'm just expressing my opinion, the decision rests with the repository owner

zennn08 avatar Jun 16 '23 03:06 zennn08