Next.js Discord

Discord Forum

ERROR  packages field missing or empty on pnpm install

Answered
ᴉuɐpɹɐɐ posted this in #help-forum
Open in Discord
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 Her Knight ❤️
looks to be a bug of the cli though if it’s not including packages
View full answer

35 Replies

@Her Knight ❤️ Can you send the pnpm-workspace.yaml
its the default ones generated by pnpm create next-app
ignoredBuiltDependencies:
  - sharp
  - unrs-resolver
@ᴉuɐpɹɐɐ yaml ignoredBuiltDependencies: - sharp - unrs-resolver
Try this.

packages: []

ignoredBuiltDependencies:
  - sharp
  - unrs-resolver
looks to be a bug of the cli though if it’s not including packages
Answer
@Her Knight ❤️
:okhon:
what version of pnpm are you using?
@ᴉuɐpɹɐɐ <@173557815326015488>
Oh, ic the issue. pnpm is a bit weird you should be able to do this instead oops
packages: 
  - .

ignoredBuiltDependencies:
  - sharp
  - unrs-resolver
give this a shot gurt
ah ok
im just curious for your pnpm version
i am using v10
exactly?
yes
10.0.0?
yeah
precisely?
wow
from january i think
yeah
we had same issue then
packages isn’t optional for some reason
it should be
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" :Sad_Kermit:
that we did
no problem