Closed styfle closed 7 months ago
What do you think should be the behavior? Should Corepack call <pkg-manager> init
in such case? Or just create a package.json
with only the "packageManager"
field?
The second option - create package.json directly with one field.
Interesting idea to call init though. Seems like that could be implemented under a different sub command however. Keep “use” simple.
@aduh95 Thanks for the quick fix! 🎉
When a package.json file is missing,
corepack use
fails with ENOENT.I think it would be great if corepack could create the package.json file when its missing.
It would avoid the need to call
npm init -y
,yarn init -y
, orpnpm init
in some cases.