changed from npm to pnpm, bot doesn't work anymore
so I don't know what to supply to you other than a message. I have created a new folder, installed all the packages using pnpm that were necessary, pasted my src and then I ran npx tsc, when I run pnpm start or node ., doesnt matter, when I just turn on the bot using any method, it wont like respond, it is active, but does nothing. is there any particular reason for that?
22 Replies
just ask me any questions you want. I am generally interested in checking out pnpm and somehow I cannot get the bot to work
and I posted it in the wrong section as well, apologies for that.
When using pnpm you have to make sure that you have the
shamefully-hoist
and public-hoist-pattern
are set correctly in your .npmrc
file.
This is because pnpm will not hoist any dependencies by default and that poses a problem with how Sapphire works with module augmentation and loading files from the filesystem.
Add this to your .npmrc
file:
probably
I got it as well
I found about it yesterday and made sure to include it
It's in root dir
okay wait for a moment
I think I messed it up
if you also nuked node_modules between tries and you're 100% sure you changed nothing else then there should be no difference between the 2
Nevermind, I thought that hoist-pattern had to be in its own line, comes out it was just my small screen cutting the text
I can nuke it again and rerun pnpm i
let's see
- No, It did not fix anything. And for clarification, I installed pnpm using npm, if it changes anything.
it shouldnt no
funny thing is that somehow I did manage to do it on my uh, vps, it like did work, and the files are exactly the same here
It did not work for the first time on there but then it did
can you show your package.json?
same timing, tell me; is there a chance it could all happen because I forgot to add module_alias in my package json? the thing to make my aliases in tsconfig work in dist folder
module-alias or whatever it was called
if you use the library, unnecessarily might I add, then yes
unnecessary because it's build into Node if you configure it a bit differently
okay I'll redo the folder in 10 minutes, need a little break. I'll let you know if it resolved anything
anyway this is what is built into Node: https://nodejs.org/docs/latest/api/packages.html#subpath-imports
Bots like @Dragonite, @Skyra , @Gemboard all use it so you can look at their code
it is weird though because suddenly my code appeared to have errors @Boomeravna ?
Didn't have them before
I cant magically see your code so idk
one example
I'll get on the other ones immediately, just dont understand how they suddenly appeared as errors
Solution
you didnt run
pnpx prisma generate
of course, I forgot about it. But why do we have to do it each time, I do technically have all the files of prisma in the folder
and yes, all errors disappeared
you deleted node_modules
it generates to node_modules/.prisma
o, it said it overwrited commands, which means it must work
there we go, it works. thank you soooo much @Boomeravna