简体   繁体   中英

I can't test my app in iOS with Expo

I have some problems when i try to run my app on phones that have iOS, but in Android don't have this problem. I'm coding in Sublime Text, not in XDE and executing my project in terminal, with commands npm start and reading the QR Code. I'm coding in Windows 10. I build the project with create-react-native-app

The erro that appears is

C:/Users/adria/Desktop/App/src/Imgs/image.png: Cannot find module 'C:/Users/adria/Desktop/App/node_moduless/expo/tools/hashAssetFiles'

In the first time i did think that image is with wrong name or wrong directory, and i go to the code and certify that is correctly. So, i resolve to try in my Android and for my surprise, work correctly.`

My project: [ https://snack.expo.io/HyKP1hyjz][1]

My package.json

{ 
  "name": "App", 
  "version": "0.1.0",
  "private": true,
  "devDependencies": { 
    "react-native-scripts": "1.11.1",  
    "jest-expo": "25.0.0", 
    "react-test-renderer": "16.2.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" }, 
  "jest": { 
    "preset": "jest-expo" 
  },
  "dependencies": { 
    "expo": "^25.0.0", 
    "react": "16.2.0",
    "react-native": "0.52.0", 
    "react-navigation": "^1.5.8"
  } 
}

I try to remove the image from my project and try run again, and have the same problem but with another image, from react-navigation

C:\\Users\\adria\\Desktop\\App\\node_modules\\react-navigation\\src\\views\\assets\\back-icon.png

您需要安装exponent软件包,请参见: https : //github.com/expo/expo/issues/72

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM