0
如果我刪除我的node_modules並在我的ReactNative項目中執行乾淨的npm安裝,我會收到警告:「[email protected]需要[email protected]~15.3.1的同行,但沒有安裝任何東西。」不過,我反應過來列爲的package.json文件的依賴性:爲什麼npm沒有安裝從package.json反應?
{
"name": "MyApp",
"version": "1.1.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"lodash": "^4.17.2",
"moment": "^2.16.0",
"react": "^15.3.1",
"react-native": "^0.37.0",
"react-native-drawer": "^2.2.6",
"react-native-htmlview": "^0.5.0",
"react-native-keyboard-spacer": "^0.3.0",
"react-native-material-design": "^0.3.7",
"react-native-modal-picker": "0.0.16",
"react-native-modalbox": "^1.3.4",
"react-native-vector-icons": "^3.0.0",
"react-native-viewpager": "^0.2.13",
"rebound": "0.0.13"
}
}
有道理!謝謝薄荷。 –