2

我运行npm outdated命令,我得到的输出不显示当前版本。这只发生在这个特定的项目上,其他项目返回输出就好了。

输出示例:

Package                       Current   Wanted   Latest  Location
@authenio/samlify-libxml-xsd  MISSING    1.0.1    1.0.1  access-management
append-query                  MISSING    2.1.0    2.1.0  access-management
aws-sdk                       MISSING  2.558.0  2.558.0  access-management

这是package.json

{
  "name": "access-management",
  "version": "1.0.131",
  "description": "Access management",
  "main": "src/index.js",
  "scripts": {},
  "keywords": [
    "identity",
    "api",
    "users",
    "permissions",
    "roles"
  ],
  "author": "Me",
  "license": "ISC",
  "dependencies": {
    "@authenio/samlify-libxml-xsd": "^1.0.1",
    "append-query": "^2.1.0",
    "aws-sdk": "^2.554.0",
    "base-64": "^0.1.0",
    "bcryptjs": "^2.4.0",
    "bluebird": "^3.7.1",
    "body-parser": "^1.19.0",
    "bunyan": "^1.8.12",
    "cassandra-driver": "^3.6.0",
    "cassandra-schema-setup": "^2.0.1",
    "chance": "^1.1.3",
    "express": "^4.17.1",
    "express-requests-logger": "^1.0.19",
    "express-validator": "^3.1.2",
    "generate-password": "^1.4.2",
    "graceful-shutdown-express": "^2.0.0",
    "jsonwebtoken": "^8.5.1",
    "kafka-node": "^4.1.3",
    "lodash": "^4.17.15",
    "moment": "^2.24.0",
    "path": "^0.12.7",
    "pkginfo": "^0.4.0",
    "prom-client": "^11.5.3",
    "prometheus-api-metrics": "^2.2.3",
    "request": "^2.88.0",
    "request-promise": "^4.2.4",
    "retry-as-promised": "^2.3.2",
    "samlify": "^2.6.1",
    "uuid": "^3.3.3",
    "validator": "^6.2.1",
    "zxcvbn": "^4.4.1"
  },
  "devDependencies": {
    "deflate-js": "^0.2.3",
    "delay": "^4.3.0",
    "eslint": "^6.5.1",
    "eslint-config-standard": "^14.1.0",
    "eslint-plugin-import": "^2.18.2",
    "eslint-plugin-node": "^10.0.0",
    "eslint-plugin-promise": "^4.2.1",
    "eslint-plugin-standard": "^4.0.1",
    "fast-xml-parser": "^3.13.0",
    "immutable": "^3.8.2",
    "mocha": "^6.2.2",
    "mochawesome": "^2.0.2",
    "mockdate": "^2.0.5",
    "node-mocks-http": "^1.8.0",
    "nyc": "^14.1.1",
    "predator": "^3.2.0",
    "proxyquire": "^1.7.11",
    "randomstring": "^1.1.5",
    "require-reload": "^0.2.2",
    "should": "^11.1.2",
    "sinon": "^2.3.7",
    "xml2js": "^0.4.22"
  }
}

请告知可能是什么原因。

4

1 回答 1

2

问题是因为在某些情况下运行命令时npm install之前没有运行。之前运行过一次npm install,所有当前版本都会出现。

于 2019-10-30T10:06:31.563 回答