【发布时间】:2016-03-08 19:33:35
【问题描述】:
我想我对 npm 如何管理依赖关系感到困惑。我看到了:
npm list react-native
project@0.0.1 /Users/me/workspace/project
└── UNMET PEER DEPENDENCY react-native@0.15.0
npm ERR! peer dep missing: react-native@^0.13.2, required by react-native-dialogs@0.0.5
npm ERR! code 1
所以我尝试...但我得到了:
npm install react-native@0.15.0
....
project@0.0.1 /Users/me/workspace/project
└─┬ UNMET PEER DEPENDENCY react-native@0.15.0
└── react-tools@0.14.0-beta1 (git+https://github.com/facebook/react.git#b4e74e38e43ac53af8acd62c78c9213be0194245)
npm WARN EPEERINVALID react-native-dialogs@0.0.5 requires a peer of react-native@^0.13.2 but none was installed.
npm ERR! code 1
我的 package.json:
{
"name": "project",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "react-native start"
},
"dependencies": {
"apsl-react-native-button": "^2.1.0",
"base-64": "^0.1.0",
"es6-react-mixins": "^0.2.1",
"fifo": "^2.3.0",
"money-math": "^2.2.0",
"react-native": "^0.15.0",
"react-native-dropdown-android": "0.0.4",
"react-native-lightbox": "^0.5.0",
"react-native-mail": "^0.2.4",
"react-native-router-flux": "^0.3.4",
"react-native-simpledialog-android": "^1.0.2",
"react-native-swiper": "^1.3.0",
"superagent": "^1.4.0",
"tcomb-form-native": "^0.3.0",
"utf8": "^2.1.1",
"react-native-facebook-login": "^1.0.0"
}
}
【问题讨论】:
-
我知道有点晚但对我有用,也许尝试删除 node_modules 并再次运行?
标签: npm react-native