如何获取最新的节点包?

时间:2018-08-14 17:25:04

标签: node.js reactjs npm

我使用松露反应盒使应用程序正常工作。 npm install给了我很多弃用警告,并且还说某些软件包需要其他未安装的软件包。有没有什么好的方法或在线的地方可以更新我的package.json文件?由于我真的很新,所以我认为缺少软件包肯定会导致很多时间的浪费。谢谢。

package.json

{
  "name": "someApp",
  "version": "0.1.0",
  "license": "MIT",
  "private": true,
  "repository": {
    "type": "git",
    "url": "some repo..."
  },
  "main": "src/index.js",
  "scripts": {
    "start": "node scripts/start.js",
    "build": "node scripts/build.js",
    "test": "node scripts/test.js --env=jsdom --watch"
  },
  "dependencies": {
    "dotenv": "^2.0.0",
    "react": "^15.4.2",
    "react-dom": "^15.4.2",
    "react-router-dom": "^4.3.1"
  },
  "devDependencies": {
    "autoprefixer": "6.5.1",
    "babel-core": "6.17.0",
    "babel-eslint": "7.1.1",
    "babel-jest": "17.0.2",
    "babel-loader": "6.2.7",
    "babel-preset-react-app": "^2.0.1",
    "case-sensitive-paths-webpack-plugin": "1.1.4",
    "chalk": "1.1.3",
    "connect-history-api-fallback": "1.3.0",
    "cross-spawn": "4.0.2",
    "css-loader": "0.26.0",
    "debug": "^3.1.0",
    "detect-port": "1.0.1",
    "eslint": "3.8.1",
    "eslint-config-react-app": "^0.5.0",
    "eslint-loader": "1.6.0",
    "eslint-plugin-flowtype": "2.21.0",
    "eslint-plugin-import": "^2.13.0",
    "eslint-plugin-jsx-a11y": "2.2.3",
    "eslint-plugin-react": "6.4.1",
    "extract-text-webpack-plugin": "1.0.1",
    "file-loader": "0.9.0",
    "filesize": "3.3.0",
    "fs-extra": "0.30.0",
    "growl": "^1.10.2",
    "gzip-size": "3.0.0",
    "html-webpack-plugin": "2.24.0",
    "http-proxy-middleware": "0.17.2",
    "jest": "19.0.1",
    "json-loader": "0.5.4",
    "minimatch": "^3.0.2",
    "object-assign": "4.1.0",
    "openzeppelin-solidity": "1.11.0",
    "path-exists": "2.1.0",
    "postcss-loader": "1.0.0",
    "promise": "7.1.1",
    "react-dev-utils": "^0.4.2",
    "recursive-readdir": "2.1.0",
    "stmux": "^1.5.5",
    "strip-ansi": "3.0.1",
    "style-loader": "0.13.1",
    "truffle": "^4.1.13",
    "truffle-contract": "^1.1.8",
    "truffle-hdwallet-provider": "0.0.6",
    "truffle-solidity-loader": "0.0.8",
    "url-loader": "^1.0.1",
    "webpack": "^1.14.0",
    "webpack-dev-server": "^1.16.2",
    "webpack-manifest-plugin": "^1.1.0",
    "whatwg-fetch": "^1.0.0"
  },
  "jest": {
    "collectCoverageFrom": [
      "src/**/*.{js,jsx}"
    ],
    "setupFiles": [
      "<rootDir>/config/polyfills.js"
    ],
    "testMatch": [
      "<rootDir>/src/**/__tests__/**/*.js?(x)",
      "<rootDir>/coverage/**/?(*.)(spec|test).js?(x)"
    ],
    "testEnvironment": "node",
    "testURL": "http://127.0.0.1:7200",
    "transform": {
      "^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest",
      "^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
      "^(?!.*\\.(js|jsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
    },
    "transformIgnorePatterns": [
      "[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"
    ],
    "moduleNameMapper": {
      "^react-native$": "react-native-web"
    },
    "moduleFileExtensions": [
      "web.js",
      "js",
      "json",
      "web.jsx",
      "jsx"
    ]
  },
  "babel": {
    "presets": [
      "react-app"
    ]
  },
  "eslintConfig": {
    "extends": "react-app"
  }
}

1 个答案:

答案 0 :(得分:1)

我使用的一个非常酷的软件包是npm-check 它提供了一个不错的界面,可以告诉您哪些软件包已过时。 interface image

要安装该软件包,请在您的终端上运行:npm install -g npm-check 要检查软件包,请在包含要检查的package.json的目录中运行npm-check