[英]I can't test my app in iOS with Expo
当我尝试在装有iOS的手机上运行我的应用程序时遇到一些问题,但在Android上则没有此问题。 我使用Sublime Text(而不是XDE)进行编码,并在终端中执行我的项目,使用命令npm start
并读取QR Code。 我在Windows 10中编码。我使用create-react-native-app
构建项目
出现的错误是
C:/Users/adria/Desktop/App/src/Imgs/image.png:找不到模块'C:/ Users / adria / Desktop / App / node_moduless / expo / tools / hashAssetFiles'
第一次,我确实认为该映像名称或目录错误,然后转到代码并确认该映像正确。 因此,我下定决心尝试在我的Android设备上尝试,令我惊讶的是,它可以正常工作。
我的项目:[ https://snack.expo.io/HyKP1hyjz] [1 ]
我的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"
}
}
我尝试从我的项目中删除该图像,然后尝试再次运行,但是从react-navigation中遇到了另一个图像,但存在相同的问题
C:\\ Users \\用户阿德里亚\\桌面\\软件\\ node_modules \\反应导航的\\ src \\意见\\ \\资产背的icon.png
您需要安装exponent
软件包,请参见: https : //github.com/expo/expo/issues/72
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.