The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
npm install adding optional true on linux, not mac
What I Wanted to Do
I want to run npm install without it adding optional true to package-lock.json.
What Happened Instead
In development on mac it doesn’t add optional true, but in production on linux, it adds this.
This issue has already been recognized, just trying to follow up on it.
Dev: Mac, Prod: Ubuntu
$ npm --versions 6.4.1 $ node -p process.platform dev: darwin prod: linux
There was a (related) fix in npm 6.6.0 (commit).
"optional": true should be there, but it isn’t always added on the first install. With this fix, it should be.