首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >重新安装和删除node_modules和package.json后未满足的对等依赖关系

重新安装和删除node_modules和package.json后未满足的对等依赖关系
EN

Stack Overflow用户
提问于 2018-09-10 13:25:25
回答 1查看 1.3K关注 0票数 2

NPM似乎要么没有认识到,要么没有安装我的package.json中列出的软件包。我不断收到警告,阻止我的构建通过,这是一个很大的问题。具体而言:

datepicker@0.49.0需要一个peer @^0.14.0\15.0.0的对等点,但没有安装任何一个。您必须自己安装对等依赖项。npm警告react datepicker@0.49.0需要一个对等的react dom@^0.14.0\x\x ^15.0.0,但没有安装。您必须自己安装对等依赖项。npm警告react modal@2.4.1需要一个peer @^0.14.0的同级程序,但没有安装任何一个。您必须自己安装对等依赖项。@2.4.1需要一个对等的react dom@^0.14.0\x\x ^15.0.0,但没有安装任何一个。您必须自己安装对等依赖项。

考虑到我的反应性依赖性为16.5.0,远远超过^14.0或^15.0,此警告令我感到困惑。我查过的所有东西都说要删除node_modules和package.json.lock,然后运行npm安装,但这似乎并没有真正解决问题或改变任何东西。任何帮助都将不胜感激。

这是我的package.json的副本

{ "version": "0.1.0", "private": true, "proxy": "http://localhost:3001", "devDependencies": { "axios-mock-adapter": "^1.13.1", "enzyme": "^3.1.0", "enzyme-adapter-react-16": "^1.0.1", "husky": "^0.13.4", "lint-staged": "^3.6.1", "node-sass-chokidar": "0.0.3", "npm-run-all": "^4.0.2", "prettier": "^1.10.2", "react-scripts": "^1.1.4", "react-test-renderer": "^16.0.0", "redux-mock-store": "^1.5.1", "redux-testkit": "^1.0.6" }, "dependencies": { "axios": "^0.16.2", "babel-polyfill": "^6.26.0", "big.js": "^5.0.3", "class-names": "^1.0.0", "create-app": "^0.6.0", "d3": "^5.5.0", "d3-array": "^1.2.1", "d3-scale": "^1.0.6", "debounce": "^1.0.2", "font-awesome": "^4.7.0", "jest-enzyme": "^4.0.1", "leaflet": "^1.0.3", "lodash": "^4.17.10", "lodash.throttle": "^4.1.1", "mixpanel-browser": "^2.13.0", "moment": "^2.18.1", "mousetrap": "^1.6.1", "numeral": "^2.0.6", "polyline-encoded": "^0.0.8", "prop-types": "^15.5.10", "query-string": "^5.0.0", "raven-js": "^3.17.0", "rc-trigger": "^1.11.2", "react": "^16.5.0", "react-bootstrap": "^0.32.0", "react-countup": "^2.1.1", "react-custom-scrollbars": "^4.1.2", "react-datepicker": "^0.49.0", "react-dom": "^16.5.0", "react-fontawesome": "^1.6.1", "react-gravatar": "^2.6.3", "react-leaflet": "^1.3.0", "react-list": "^0.8.6", "react-markdown": "^2.5.1", "react-modal": "^2.3.2", "react-redux": "^5.0.5", "react-router": "^4.2.0", "react-router-dom": "^4.2.2", "react-slider": "^0.8.0", "react-sortable-hoc": "^0.6.5", "react-transition-group": "1.x", "redux": "^3.6.0", "redux-form": "^7.0.0", "redux-logger": "^3.0.6", "redux-thunk": "^2.2.0", "reselect": "^3.0.1", "yarn": "^1.3.2" }, "scripts": { "build": "yarn run build-css && react-scripts build", "build-css": "npm rebuild node-sass && node-sass-chokidar --include-path ./src --include-path ./node_modules ./src/ -o ./src/", "deploy": "./deploy.sh", "eject": "react-scripts eject", "precommit": "lint-staged", "start": "npm-run-all -p watch-css start-js", "start-js": "react-scripts start", "test": "react-scripts test --env=jsdom", "watch-css": "yarn run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules ./src/ -o ./src/ --watch --recursive" }, "lint-staged": { "*.js": [ "prettier --single-quote --write", "git add", "prettier --write" ] } }

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-09-10 13:32:21

考虑到我的反应性依赖性为16.5.0,远远超过^14.0或^15.0,此警告令我感到困惑。

^15.0.0是指从15.0.0到(但不包括) 16.0.0的任何东西。

所以16.5.0实际上太新了。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52258817

复制
相关文章

相似问题

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