ERROR packages field missing or empty on pnpm install
Answered
aardani posted this in #help-forum
aardaniOP
This error occured when i try to
pnpm install on a fresh Next.js install. Not sure what causes it or if its just my pnpm setup. The workaround is to rename pnpm-workspace.yaml into something else.Answered by Palomino
looks to be a bug of the cli though if it’s not including packages
35 Replies
@Palomino Can you send the pnpm-workspace.yaml
aardaniOP
its the default ones generated by
pnpm create next-appignoredBuiltDependencies:
- sharp
- unrs-resolver@aardani yaml
ignoredBuiltDependencies:
- sharp
- unrs-resolver
Palomino
Try this.
packages: []
ignoredBuiltDependencies:
- sharp
- unrs-resolverPalomino
looks to be a bug of the cli though if it’s not including packages
Answer
@Palomino Try this.
yaml
packages: []
ignoredBuiltDependencies:
- sharp
- unrs-resolver
aardaniOP
ooooh!!! thank you so much
@aardani <@173557815326015488>
Palomino
Oh, ic the issue. pnpm is a bit weird you should be able to do this instead oops
packages:
- .
ignoredBuiltDependencies:
- sharp
- unrs-resolvergive this a shot gurt
@Palomino Oh, ic the issue. pnpm is a bit weird you should be able to do this instead oops
aardaniOP
packages: [] fixes it dont worryPalomino
ah ok
aardaniOP
im just curious for your pnpm version
Palomino
i am using v10
aardaniOP
exactly?
Palomino
yes
aardaniOP
10.0.0?
Palomino
yeah
aardaniOP
precisely?
wow
Palomino
from january i think
yeah
aardaniOP
we had same issue then
Palomino
packages isn’t optional for some reason
it should be
aardaniOP
i found out that
packages prop no longer needed after 10.5 and the CNA omit the package props after major 10 (as seen in the code)this might be might chance to contribute but im mentally prepared for them to close this issue instantly and get told "dev just need to update pnpm, closing it thx bye" 

@aardani this might be might chance to contribute but im mentally prepared for them to close this issue instantly and get told "dev just need to update pnpm, closing it thx bye" <:Sad_Kermit:1065708651945406494>
Palomino
I mean it would be nice of them to consider backporting, that would be a good thing so other people don’t run into same issue
that we did
yeah they need to do a couple more checks
Palomino
no problem

