Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why npm add some property with underscore in package.json

when i perform npm install koa-compose, npm will auto add some property with underscore, What role do they have? like this:

{
  "_args": [
    [
      "koa-compose",
      "/Users/keenwon/Desktop/demo"
    ]
  ],
  "_from": "koa-compose@latest",
  "_id": "[email protected]",
  "_inCache": true,
  "_installable": true,
  "_location": "/koa-compose",
  "_nodeVersion": "5.7.0",
  "_npmVersion": "3.7.5",
  "_phantomChildren": {},
  "_spec": "koa-compose",
  "_where": "/Users/keenwon/Desktop/demo"
  "version": "2.4.0"
}
like image 254
keenwon Avatar asked May 17 '16 10:05

keenwon


1 Answers

This is a duplicate of What are these properties prefixing underscore used for in package.json? Answer: https://stackoverflow.com/a/42625703/6307425

Those are meta data reserved for package registries. All properties beginning with _ or $ are reserved for package registries to use at their discretion. wiki common "Reserved Properties" section explains it.

like image 157
Manny Avatar answered Oct 23 '22 21:10

Manny