On npm install
, I see that in package-lock.json
property packages[""].name
is sometimes removed and sometimes added. How to prevent this change, since it appears in git changes?
Name under black package in package-lock.json keeps removing and adding automatically
Asked Answered
I have experienced this behaviour that name is added when package.json has a name that is different from project root directory name.
projectdir/package.json
with name="projectdir" => no name in package-lock.json
projectdir/package.json
with name="anothername" => name="anothername" in package-lock.json
I have the same issue, but my project folder name and the name in the package.json are the same –
Printable
I had the same problem an found the solution to remove the package name in package.json file. So I remove this line:
"name": "My package name",
© 2022 - 2024 — McMap. All rights reserved.
name
despite the fact those shared packages have had thename
property since the beginning. It's kind of odd. – Madgemadhouse