zuiidea / antd-admin

An excellent front-end solution for enterprise applications built upon Ant Design and UmiJS
https://antd-admin.zuiidea.com
MIT License
9.64k stars 2.52k forks source link

package.json,如何使用指定的低版本的antd #682

Closed LDD123 closed 6 years ago

LDD123 commented 6 years ago

在package.json中写了antd的版本,但是每次 npm install 的时候,都会把最新版本的antd安装上去,有的样式就飞了,想问下,怎样写,antd版本不会升级,安装指定版本。

5c062282dc8dcbcf95cdd408aa6a4f1e

d219b71b3f0654481eac47c6c985e61c

allinshang commented 6 years ago

希望这篇文章可以帮到你: package.json依赖管理dependencies中 ^ 和 ~ 的区别 http://blog.163.com/sdhhqb@126/blog/static/6370553720153147217298/ ^2.10.4-2.10.4

LDD123 commented 6 years ago

@allinshang ^2.10.4-2.10.4这样写不行,安装的还是2.13.5

LDD123 commented 6 years ago

peerDependencies link webpack@1.12.15 in /home/frontEndTest/node_modules/_extract-text-webpack-plugin@1.0.1@extract-text-webpack-plugin unmet with /home/frontEndTest/node_modules/webpack(1.15.0) peerDependencies link ajv@4.11.8 in /home/frontEndTest/node_modules/_ajv-keywords@1.5.1@ajv-keywords unmet with /home/frontEndTest/node_modules/ajv(5.4.0) peerDependencies link react@0.14.9 in /home/frontEndTest/node_modules/_react-dom@0.14.9@react-dom unmet with /home/frontEndTest/node_modules/react(15.6.2) peerDependencies link webpack@1.12.15 in /home/frontEndTest/node_modules/_babel-loader@6.2.10@babel-loader unmet with /home/frontEndTest/node_modules/webpack(1.15.0) peerDependencies link less@2.6.1 in /home/frontEndTest/node_modules/_less-loader@2.2.3@less-loader unmet with /home/frontEndTest/node_modules/less(2.7.3) peerDependencies WARNING antd@2.10.4 › react-slick@0.14.11 › slick-carousel@^1.6.0 requires a peer of jquery@>=1.8.0 but none was installed deprecate roadhog@0.5.4 › babel-preset-es2015@^6.18.0 ???? Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! deprecate atool-test-mocha@0.1.7 › babel-preset-es2015@~6.3.13 ???? Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! anti semver antd@2.10.4 › rc-collapse@1.7.6 › rc-animate@2.x delcares rc-animate@2.x(resolved as 2.4.1) but using ancestor(antd)'s dependency rc-animate@~2.3.0(resolved as 2.3.6) anti semver antd@2.10.4 › rc-dialog@6.5.11 › rc-animate@2.x delcares rc-animate@2.x(resolved as 2.4.1) but using ancestor(antd)'s dependency rc-animate@~2.3.0(resolved as 2.3.6) anti semver antd@2.10.4 › rc-cascader@0.11.6 › rc-trigger@1.11.5 › rc-animate@2.x delcares rc-animate@2.x(resolved as 2.4.1) but using ancestor(antd)'s dependency rc-animate@~2.3.0(resolved as 2.3.6) anti semver antd@2.10.4 › rc-menu@5.0.13 › rc-animate@2.x delcares rc-animate@2.x(resolved as 2.4.1) but using ancestor(antd)'s dependency rc-animate@~2.3.0(resolved as 2.3.6) anti semver antd@2.10.4 › rc-notification@1.4.3 › rc-animate@2.x delcares rc-animate@2.x(resolved as 2.4.1) but using ancestor(antd)'s dependency rc-animate@~2.3.0(resolved as 2.3.6) anti semver antd@2.10.4 › rc-select@6.8.11 › rc-animate@2.x delcares rc-animate@2.x(resolved as 2.4.1) but using ancestor(antd)'s dependency rc-animate@~2.3.0(resolved as 2.3.6) anti semver antd@2.10.4 › rc-select@6.8.11 › rc-menu@5.1.4 › rc-animate@2.x delcares rc-animate@2.x(resolved as 2.4.1) but using ancestor(antd)'s dependency rc-animate@~2.3.0(resolved as 2.3.6) anti semver antd@2.10.4 › rc-tree@1.5.0 › rc-animate@2.x delcares rc-animate@2.x(resolved as 2.4.1) but using ancestor(antd)'s dependency rc-animate@~2.3.0(resolved as 2.3.6) anti semver antd@2.10.4 › rc-slider@7.0.8 › rc-tooltip@3.7.0 › rc-trigger@2.3.0 › rc-animate@2.x delcares rc-animate@2.x(resolved as 2.4.1) but using ancestor(antd)'s dependency rc-animate@~2.3.0(resolved as 2.3.6) anti semver antd@2.10.4 › rc-tree-select@1.9.7 › rc-tree@1.4.8 › rc-animate@2.x delcares rc-animate@2.x(resolved as 2.4.1) but using ancestor(antd)'s dependency rc-animate@~2.3.0(resolved as 2.3.6) Recently updated (since 2017-11-16): 21 packages (detail see file /home/frontEndTest/node_modules/.recently_updates.txt) Today: → mockjs@1.0.1-beta3 › commander@*(2.12.1) (18:18:50) → babel-cli@6.26.0 › convert-source-map@^1.5.0(1.5.1) (18:19:57) → roadhog@0.5.4 › copy-webpack-plugin@^4.0.1(4.2.3) (18:08:56) → dora-plugin-webpack@0.8.1 › koa-webpack-dev-middleware@1.2.2 › webpack-dev-middleware@1.6.1 › mime@^1.3.4(1.5.0) (05:38:40) → roadhog@0.5.4 › webpack-dev-server@1.16.5 › webpack-dev-middleware@^1.10.2(1.12.1) (01:50:27) → eslint@3.19.0 › escope@3.6.0 › es6-weak-map@2.0.2 › es5-ext@^0.10.14(0.10.36) (18:11:01) ✔ All packages installed (1197 packages installed from npm registry, used 31s, speed 75.3kB/s, json 1005(2.26MB), tarball 0B)

zuiidea commented 6 years ago

"antd": "2.13.8",不带任何符号就是指定版本