Jos*_*ila 3 android build ios react-native expo
我正在 firebase 上进行 CRUD,我正在使用expo进行React Native。
\n我运行命令:eas build -p android --profile preview,在预构建部分它给了我错误:npm exited with non-zero code: 1所以我犯了更多错误。
这些是给我带来错误的所有错误:
\n- Creating native project directories (./ios and ./android) and updating .gitignore\n\xe2\x9c\x94 Created native project | gitignore skipped\n- Adding Metro bundler config\n\xe2\x9c\x94 Added Metro config\n- Updating your package.json scripts, dependencies, and main file\n\xe2\x9c\x94 Updated package.json and added index.js entry point for iOS and Android\n\xe2\x80\xba Removed "main": "node_modules/expo/AppEntry.js" from package.json because we recommend using index.js as main instead\n- Config syncing\n[stderr] Using node to generate images. This is much slower than using native packages.\n[stderr] \xe2\x80\xba Optionally you can stop the process and try again after successfully running `npm install -g sharp-cli`.\n- Config syncing\n[stderr] \xc2\xbb android: userInterfaceStyle: Install expo-system-ui in your project to enable this feature.\n- Config syncing\n\xe2\x9c\x94 Config synced\nRunning "npm install" in the root dir of your repository \n[stderr] npm ERR! code ERESOLVE\n[stderr] npm ERR! ERESOLVE could not resolve\n[stderr] npm ERR! \n[stderr] npm ERR! While resolving: styled-components@5.3.6\n[stderr] npm ERR! Found: react@18.1.0\n[stderr] npm ERR! node_modules/react\n[stderr] npm ERR! react@"18.1.0" from the root project\n[stderr] npm ERR! peer react@">=16.3.0" from @callstack/react-theme-provider@3.0.8\n[stderr] npm ERR! node_modules/@callstack/react-theme-provider\n[stderr] npm ERR! @callstack/react-theme-provider@"^3.0.7" from react-native-paper@4.12.5\n[stderr] npm ERR! node_modules/react-native-paper\n[stderr] npm ERR! react-native-paper@"^4.12.5" from the root project\n[stderr] npm ERR! 1 more (@react-navigation/material-bottom-tabs)\n[stderr] npm ERR! 20 more (@react-native-community/masked-view, ...)\n[stderr] npm ERR! \n[stderr] npm ERR! Could not resolve dependency:\n[stderr] npm\n[stderr] ERR! peer react-dom@">= 16.8.0" from styled-components@5.3.6\n[stderr] npm ERR! node_modules/styled-components\n[stderr] npm ERR! styled-components@"^5.3.6" from the root project\n[stderr] npm ERR! peer styled-components@">= 2" from babel-plugin-styled-components@2.0.7\n[stderr] npm ERR! node_modules/babel-plugin-styled-components\n[stderr] npm ERR! babel-plugin-styled-components@">= 1.12.0" from styled-components@5.3.6\n[stderr] npm ERR! \n[stderr] npm ERR! Conflicting peer dependency: react@18.2.0\n[stderr] npm ERR! node_modules/react\n[stderr] npm ERR! peer react@"^18.2.0" from react-dom@18.2.0\n[stderr] npm ERR! node_modules/react-dom\n[stderr] npm ERR! peer react-dom@">= 16.8.0" from styled-components@5.3.6\n[stderr] npm ERR! node_modules/styled-components\n[stderr] npm ERR! styled-components@"^5.3.6" from the root project\n[stderr] npm ERR! 1 more (babel-plugin-styled-components)\n[stderr] npm ERR! \n[stderr] npm ERR! Fix the upstream dependency conflict, or retry\n[stderr] npm ERR! this command with --force, or --legacy-peer-deps\n[stderr] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.\n[stderr] npm ERR! \n[stderr] npm ERR! See /home/expo/.npm/eresolve-report.txt for a full report.\n[stderr] npm ERR! A complete log of this run can be found in:\n[stderr] npm ERR! /home/expo/.npm/_logs/2022-11-29T23_23_53_860Z-debug-0.log\nnpm exited with non-zero code: 1\nRun Code Online (Sandbox Code Playgroud)\n\n这是我的 package.json:
\n{\n "name": "crud---",\n "version": "1.0.0",\n "main": "node_modules/expo/AppEntry.js",\n "scripts": {\n "start": "expo start",\n "android": "expo start --android",\n "ios": "expo start --ios",\n "web": "expo start --web",\n "build": "expo build"\n },\n "dependencies": {\n "@react-native-async-storage/async-storage": "~1.17.3",\n "@react-native-community/masked-view": "^0.1.11",\n "@react-navigation/material-bottom-tabs": "^6.2.5",\n "@react-navigation/native": "^6.0.14",\n "@react-navigation/native-stack": "^6.9.2",\n "dotenv": "^16.0.3",\n "expo": "~47.0.8",\n "expo-constants": "^14.0.2",\n "expo-image-picker": "~14.0.2",\n "expo-screen-orientation": "~5.0.1",\n "expo-status-bar": "~1.4.2",\n "firebase": "^9.6.7",\n "formik": "^2.2.9",\n "js-base64": "^3.7.3",\n "lottie-react-native": "^5.1.4",\n "react": "18.1.0",\n "react-native": "0.70.5",\n "react-native-gesture-handler": "^2.8.0",\n "react-native-image-picker": "^4.7.0",\n "react-native-masked-view": "^0.2.0",\n "react-native-paper": "^4.12.5",\n "react-native-progress": "^5.0.0",\n "react-native-safe-area-context": "^4.4.1",\n "react-native-screens": "^3.18.2",\n "react-native-vector-icons": "^9.2.0",\n "react-native-web": "^0.18.10",\n "rn-emoji-keyboard": "^1.1.0",\n "styled-components": "^5.3.6",\n "yup": "^0.32.11"\n },\n "devDependencies": {\n "@babel/core": "^7.12.9"\n },\n "private": true\n}\n\nRun Code Online (Sandbox Code Playgroud)\n我该如何解决?
\n| 归档时间: |
|
| 查看次数: |
6428 次 |
| 最近记录: |