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
Favna3mo ago
It does. I'm guessing "it" is eslint plugin import?
čamdžić
čamdžić3mo ago
I don't have eslint
Favna
Favna3mo ago
then please show not tell. Show the code, show the error
čamdžić
čamdžić3mo 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
Favna3mo ago
are you using pnpm?
čamdžić
čamdžić3mo ago
mhm
Solution
Sapphire
Sapphire3mo 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ć3mo ago
.npmrc file locally? in root of a bot
Favna
Favna3mo ago
yes create a file
čamdžić
čamdžić3mo 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
Favna3mo 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ć3mo ago
so should i delete everything and install again everything after doing that @Boomeravna
Favna
Favna3mo ago
Yes
Want results from more Discord servers?
Add your server