-->

new field false in Package.json

2020-08-21 02:54发布

问题:

After upgrading to npm 5.* I have noticed a new field on the package.json which is really obscure and unintelligible.

What false: {} means?

{
  "name": "test",
  "devDependencies": {},
  "dependencies": {},

  // What that means? What's the goal?
  "false": {}
}

回答1:

This was bug #17141 in npm.

It was fixed in commit c3b586a on June 30th and that was released in version 5.1.0 on July 5th.

The fix for anyone experiencing this is to simply update npm.

You can update by running: npm install -g npm