2015-12-11 158 views
0

[email protected]取決於[email protected]^0.13.3,但[email protected]被安裝爲依賴項。它還將[email protected]安裝在node_modules的頂層(這很奇怪但很好)。 0.14.3版本打破了我的申請。NPM安裝的錯誤版本2

我希望只安裝[email protected]而不是頂級,但在node_modules /反應的自舉/ node_modules /反應過來

爲什麼我得到[email protected]

我也嘗試在peerDependencies中添加[email protected],但我仍然得到0.14.3。我也嘗試過使用npm 3,但是對於我用npm 3創建的應用程序來說,做一個乾淨的npm install需要75分鐘,所以我希望有一種方法可以用npm 2安裝react-bootstrap。

kullervo: ~/tmp 
$ mkdir test-react-bootstrap 

kullervo: ~/tmp 
$ cd test-react-bootstrap 

kullervo: ~/tmp/test-react-bootstrap 
$ npm install [email protected] 
npm WARN peerDependencies The peer dependency [email protected]^0.13 included from react-bootstrap will no 
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
npm WARN peerDependencies The peer dependency [email protected]>=0.11.0 included from uncontrollable will no 
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
npm WARN peerDependencies The peer dependency [email protected]>=0.13.0 included from react-overlays will no 
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
[email protected] node_modules/react 
└── [email protected] ([email protected], [email protected]) 

[email protected] node_modules/react-bootstrap 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
└── [email protected] ([email protected]) 

kullervo: ~/tmp/test-react-bootstrap 
$ grep version node_modules/react-bootstrap/package.json | head -n 1 
    "version": "0.26.4", 

kullervo: ~/tmp/test-react-bootstrap 
$ grep version node_modules/react-bootstrap/node_modules/react/package.json | head -n 1 
    "version": "0.14.3", 

kullervo: ~/tmp/test-react-bootstrap 
$ grep version node_modules/react/package.json | head -n 1 
    "version": "0.13.3", 

kullervo: ~/tmp/test-react-bootstrap 
$ node -v 
v0.12.9 

kullervo: ~/tmp/test-react-bootstrap 
$ npm -v 
2.14.9 

回答

0

似乎npm 2只是簡單的破碎。通過升級所有應用程序的代碼,我可以使用最新版本的節點和npm,並突然表現出色。案件結案。獲得的經驗:不要使用npm 2.