Packages problem

Hello Hello, I manually installed the packages using the commands from the guide, but when I extended the container and declared "@sapphire/pieces" it said that I don't have that package installed, does it come with /framework or not?
Solution:
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:...
Jump to solution
13 Replies
Favna
Favna5mo ago
It does. I'm guessing "it" is eslint plugin import?
čamdžić
čamdžićOP5mo ago
I don't have eslint
Favna
Favna5mo ago
then please show not tell. Show the code, show the error
čamdžić
čamdžićOP5mo ago
it's not the error, it's just that "@sapphire/framework" didn't installed /pieces automatically i had to did it manually is that normal or
Favna
Favna5mo ago
are you using pnpm?
čamdžić
čamdžićOP5mo ago
mhm
Solution
Spinel
Spinel5mo ago
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:
shamefully-hoist=true
public-hoist-pattern[]=@sapphire/*
shamefully-hoist=true
public-hoist-pattern[]=@sapphire/*
čamdžić
čamdžićOP5mo ago
.npmrc file locally? in root of a bot
Favna
Favna5mo ago
yes create a file
čamdžić
čamdžićOP5mo ago
const rarity = await args.pick('rarity').catch((reason) => {
return message.channel.send({
embeds: [
this.container.embedBuilder.error(
`Invalid rarity provided. ${reason}`
)
]
});
});
const rarity = await args.pick('rarity').catch((reason) => {
return message.channel.send({
embeds: [
this.container.embedBuilder.error(
`Invalid rarity provided. ${reason}`
)
]
});
});
@Boomeravna do you know how to handle custom arguments errors i dont see it on guide
Favna
Favna5mo ago
add a listener for the Events.CommandError event https://sapphirejs.dev/docs/Guide/listeners/creating-your-own-listeners
Sapphire Framework
Creating your own listeners | Sapphire
Similar to what you learned in both Creating Commands and [Creating
čamdžić
čamdžićOP5mo ago
so should i delete everything and install again everything after doing that @Boomeravna
Favna
Favna5mo ago
Yes
Want results from more Discord servers?
Add your server