我一直在开发一个新的react-native应用程序。从使用世博会开始。
我有源控件中的东西,刚刚在mac上打开它。当我npm install
时,我收到以下警告
npm WARN react-native-branch@2.0.0-beta.3 requires a peer of react@>=15.4.0 but none was installed.
npm WARN lottie-react-native@1.1.1 requires a peer of react@>=15.3.1 but none was installed.
npm WARN react-native-maps@0.15.2 requires a peer of react@>=15.4.0 but none was installed
npm WARN react-static-container@1.0.1 requires a peer of react@^0.13.0 || ^0.14.0 || ^15.0.0 but none was installed.
npm WARN react-test-renderer@15.4.2 requires a peer of react@^15.4.2 but none was installed.
npm WARN react-dom@15.6.1 requires a peer of react@^15.6.1 but none was installed.
当我npm start
时,显示了barcocde但是构建花了5分钟而无法在手机上加载(超时)。
我做了一个空白文件更改以刺激重新构建。这种情况立即发生,但在电话上却出现了错误。
16:23:59: Warning: Failed prop type: Invalid prop `flex` of type `function` supplied to `View`, expected `number`.
Bad object: {}
关于包管理/反应/反应本地的事情,我设法误解了吗?它所使用的机器是一台PC,非工作机器是一台Mac mini。
我的package.json是这样的。
{
"name": "super-app",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-jest": "19.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "19.0.2",
"jest-react-native": "^18.0.0",
"react-test-renderer": "~15.4.1",
"lodash.isequal": "^4.5.0",
"react-addons-pure-render-mixin": "^15.4.2",
"react-dom": "^15.4.2",
"react-native-experimental-navigation": "0.26.x",
"react-native-tabs": "^1.0.9",
"react-static-container": "1.0.1",
"react-native-scripts": "0.0.40",
"jest-expo": "~18.0.0"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"apsl-react-native-button": "^3.0.2",
"expo": "^18.0.3",
"react": "16.0.0-alpha.12",
"react-native": "0.45.0",
"react-native-button": "^1.8.2",
"react-native-drawer": "^2.3.0",
"react-native-router-flux": "^3.39.1"
}
}
答案 0 :(得分:1)
brew install yarn
那么快乐了。
在这个生态系统的未知活动部分的网络中仍然感到迷失!