Thanks Zell for the article.
I've always thought those package.json properties were to be added manually (, which is how I have been doing 😅) but npm init auto generating them is easier & less error prone.
I was wondering about workaround of renaming package.json mentioned in "The second best time to npm init".
Initially I thought npm init would add new props, which it did.
But then I added bad props that are to be added by npm init manually, and they weren't overwritten (tried npm init with & without --force flag) but only added a missing property, keywords.
So your flow below makes total sense 🙂
rename the package.json the original
👉 then npm init to create a new one with correct metadata.
Thanks Zell for the article.
I've always thought those package.json properties were to be added manually (, which is how I have been doing 😅) but
npm init
auto generating them is easier & less error prone.I was wondering about workaround of renaming
package.json
mentioned in "The second best time to npm init".Initially I thought
npm init
would add new props, which it did.But then I added bad props that are to be added by
npm init
manually, and they weren't overwritten (triednpm init
with & without--force
flag) but only added a missing property,keywords
.So your flow below makes total sense 🙂
package.json
the originalnpm init
to create a new one with correct metadata.package.json
This is interesting. Thanks for testing and posting your tests :)