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