首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >"npm安装“并不能安装所有的依赖项

"npm安装“并不能安装所有的依赖项
EN

Stack Overflow用户
提问于 2019-04-12 19:13:52
回答 1查看 963关注 0票数 0

我正在建立一个生产代码的反应使用npm。npm install并不安装所有的依赖项。它总是显示一些警告。

代码语言:javascript
复制
>npm install
npm WARN eslint-config-react-app@3.0.8 requires a peer of eslint@5.x but none is installed. You must install peer dependencies yourself.
npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@1.12.2 requires a peer of webpack@^1.0.0 || ^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server@2.11.5 requires a peer of webpack@^2.2.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package react is included as both a dev and production dependency.
npm WARN The package react-dom is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

audited 68747 packages in 99.074s
found 114 vulnerabilities (104 low, 9 moderate, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details

我已经尝试手动安装依赖项,但它们的不同版本出现在另一次。

这是我的package.json

代码语言:javascript
复制
{
  "name": "react-pivottable",
  "version": "0.8.0",
  "description": "An Excel like pivot table",
  "main": "PivotTableUI.js",
  "files": [
    "PivotTable.js",
    "PivotTableUI.js",
    "PlotlyRenderers.js",
    "TableRenderers.js",
    "Utilities.js",
    "PivotTable.js.map",
    "PivotTableUI.js.map",
    "PlotlyRenderers.js.map",
    "TableRenderers.js.map",
    "Utilities.js.map",
    "pivottable.css"
  ],
  "scripts": {
    "start": "webpack-dev-server",
    "build": "react-scripts build",
    "predeploy": "npm run build",
    "deploy": "gh-pages -b master -d build"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/805bluebell/frontEndProjProd.git"
  },
  "keywords": [
    "react",
    "pivottable"
  ],
  "author": "Pankaj Kumar",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/805bluebell/frontEndProjProd/issues"
  },
  "homepage": "https://805bluebell.github.io/frontEndProjProd",
  "dependencies": {
    "acorn": "^6.0.0",
    "babel-core": "^6.26.3",
    "gh-pages": "^2.0.1",
    "immutability-helper": "^2.3.1",
    "plotly.js": "^1.47.1",
    "prop-types": "^15.5.10",
    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "react-draggable": "^3.0.3",
    "react-scripts": "2.1.8",
    "react-sortablejs": "^1.3.4",
    "sortablejs": "^1.6.1",
    "typescript": "^3.4.3",
    "webpack-cli": "^3.3.0"
  },
  "peerDependencies": {
    "react": ">=15.0.0",
    "react-dom": ">=15.0.0"
  },
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-eslint": "^9.0.0",
    "babel-loader": "^7.1.2",
    "babel-plugin-add-module-exports": "^0.2.1",
    "babel-preset-env": "^1.6.1",
    "babel-preset-react": "^6.24.1",
    "css-loader": "^0.28.7",
    "eslint": "^4.5.0",
    "eslint-config-prettier": "^2.8.0",
    "eslint-plugin-import": "^2.7.0",
    "eslint-plugin-react": "^7.3.0",
    "jest": "^21.2.1",
    "papaparse": "^4.3.6",
    "prettier": "^1.8.2",
    "react": ">=15.0.0",
    "react-dom": ">=15.0.0",
    "react-dropzone": "^4.2.1",
    "react-hot-loader": "^3.1.1",
    "react-plotly.js": "^2.0.0",
    "style-loader": "^0.19.0",
    "webpack": "^4.4.0",
    "webpack-dev-server": "^2.9.3"
  }
}

我想制作一个生产构建来进行部署。

EN

回答 1

Stack Overflow用户

发布于 2019-04-12 19:16:57

你应该试试纱线:

  • 删除包-锁. file文件
  • 删除节点-模块文件夹
  • $yarn安装
票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55658128

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档