Closed huaweimin closed 2 years ago
When i install electron-builder, and configure package.json file to run build, everything is going on smoothly. But when i run it from the dist file, it occured an error. I have try to change the metro version, but it doesn't work.
My package.json file is as followed:
{ "name": "hcp-test", "version": "1.0.0", "main": "node_modules/expo/AppEntry.js", "description": "hcp-test", "author": "hwm", "license": "MIT", "build": { "productName": "test", "appId": "com.hcp.test", "copyright": "© huaweimin 2022", "directories": { "output": "dist" }, "nsis": { "oneClick": false, "allowElevation": true, "allowToChangeInstallationDirectory": true, "installerIcon": "", "uninstallerIcon": "", "installerHeaderIcon": "", "createDesktopShortcut": true, "createStartMenuShortcut": true, "shortcutName": "rabbit" }, "win": { "icon": "", "requestedExecutionLevel": "requireAdministrator", "target": [ { "target": "nsis" } ], "extraFiles": { "from": "./from/", "to": "to" } }, "dmg": { "contents": [ { "x": 410, "y": 150, "type": "link", "path": "/Applications" }, { "x": 130, "y": 150, "type": "file" } ] }, "mac": { "icon": "html/icon.ico" }, "linux": { "icon": "html/icon.ico" } }, "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject", "test": "jest --watchAll", "win32": "electron-builder --win --ia32", "win64": "electron-builder --win --x64", "mac": "electron-builder --mac", "linux": "electron-builder --linux" }, "jest": { "preset": "jest-expo" }, "dependencies": { "@expo/vector-icons": "^12.0.0", "@react-navigation/bottom-tabs": "^6.0.5", "@react-navigation/native": "^6.0.2", "@react-navigation/native-stack": "^6.1.0", "expo": "~44.0.0", "expo-asset": "~8.4.4", "expo-constants": "~13.0.0", "expo-font": "~10.0.4", "expo-linking": "~3.0.0", "expo-splash-screen": "~0.14.0", "expo-status-bar": "~1.2.0", "expo-web-browser": "~10.1.0", "react": "17.0.1", "react-dom": "17.0.1", "react-native": "0.64.3", "react-native-safe-area-context": "3.3.2", "react-native-screens": "~3.10.1", "react-native-web": "0.17.1" }, "devDependencies": { "@babel/core": "^7.12.9", "@expo/electron-adapter": "^0.0.55", "@expo/webpack-config": "^0.16.16", "@types/react": "~17.0.21", "@types/react-native": "~0.64.12", "electron": "^6.0.12", "electron-builder": "^22.14.5", "jest": "^26.6.3", "jest-expo": "~44.0.1", "react-test-renderer": "17.0.1", "typescript": "~4.3.5" }, "private": true }
@huaweimin hey, may I ask what's your solution on this?
When i install electron-builder, and configure package.json file to run build, everything is going on smoothly. But when i run it from the dist file, it occured an error. I have try to change the metro version, but it doesn't work.
My package.json file is as followed: