microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.24k stars 1.14k forks source link

RN Application runs on both iOS and Android, but fails when Windows build is created. #12904

Closed dannyouu closed 5 months ago

dannyouu commented 5 months ago

Discussed in https://github.com/microsoft/react-native-windows/discussions/12899

Originally posted by **dannyouu** April 1, 2024 Hi, I have a running app on both iOS and Android and when I follow the steps in this article to create a win build https://microsoft.github.io/react-native-windows/docs/getting-started I get a few errors see bellow screens for refference. Here's my package.json to start with: ```json "dependencies": { "@babel/traverse": "7.23.2", "@growthbook/growthbook-react": "^0.23.0", "@react-native-async-storage/async-storage": "^1.21.0", "@react-native-community/cli": "^12.1.1", "@react-native-community/cli-debugger-ui": "^13.6.4", "@react-native-community/cli-platform-android": "^12.1.1", "@react-native-community/netinfo": "^11.0.1", "@react-navigation/bottom-tabs": "^6.4.0", "@react-navigation/core": "^6.4.9", "@react-navigation/drawer": "^6.6.6", "@react-navigation/elements": "^1.3.19", "@react-navigation/native": "^6.1.8", "@react-navigation/native-stack": "^6.9.14", "@reduxjs/toolkit": "^1.7.1", "@sentry/node": "7.58.1", "@sentry/profiling-node": "1.1.1", "@sentry/react-native": "5.5.0", "@sentry/tracing": "7.45.0", "@skarlatov/react-event-bus": "2.0.6", "abab": "^2.0.6", "axios": "^1.3.4", "axios-mock-adapter": "^1.20.0", "date-fns": "^2.28.0", "emoji-regex": "^10.3.0", "i18next": "21.9.1", "immutability-helper": "^3.1.1", "jwt-decode": "^3.1.2", "lodash": "^4.17.21", "normalizr": "^3.6.2", "react": "18.2.0", "react-i18next": "^13.2.2", "react-native": "^0.73.0", "react-native-aes-crypto": "^3.0.1", "react-native-bootsplash": "4.1.0", "react-native-config": "^1.5.1", "react-native-currency-input": "^1.0.1", "react-native-device-info": "8.4.8", "react-native-elements": "^3.4.2", "react-native-fast-image": "8.5.11", "react-native-gesture-handler": "^2.14.0", "react-native-get-random-values": "^1.9.0", "react-native-gradle-plugin": "^0.71.19", "react-native-interactable": "^2.0.1", "react-native-keychain": "^8.1.2", "react-native-localize": "^2.2.4", "react-native-orientation-locker": "1.4.0", "react-native-pager-view": "6.0.0", "react-native-permissions": "3.2.0", "react-native-reanimated": "^3.6.0", "react-native-reanimated-carousel": "^3.5.0", "react-native-rsa-native": "^2.0.5", "react-native-safe-area-context": "^4.5.3", "react-native-screens": "^3.21.0", "react-native-size-matters": "^0.4.0", "react-native-svg": "^14.0.0", "react-native-svg-transformer": "patch:react-native-svg-transformer@patch%3Areact-native-svg-transformer@npm%253A1.1.0%23~/.yarn/patches/react-native-svg-transformer-npm-1.1.0-0268e56ebd.patch%3A%3Aversion=1.1.0&hash=389e8e#", "react-native-uuid": "^2.0.1", "react-native-vector-icons": "^10.0.0", "react-native-vision-camera": "patch:react-native-vision-camera@npm%3A3.6.14#~/.yarn/patches/react-native-vision-camera-npm-3.6.14-4de68f47f3.patch", "react-native-windows": "0.73.11", "react-redux": "^7.2.6", "recyclerlistview": "^4.2.0", "redux": "^4.1.1", "redux-persist": "^6.0.0", "redux-thunk": "^2.4.2", "ts-node": "10.9.1", "uuidv4": "^6.2.13" }, "devDependencies": { "@babel/core": "^7.21.8", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", "@babel/plugin-proposal-optional-chaining": "^7.16.7", "@babel/plugin-transform-arrow-functions": "^7.16.7", "@babel/plugin-transform-shorthand-properties": "^7.16.7", "@babel/plugin-transform-template-literals": "^7.16.7", "@babel/preset-typescript": "^7.16.7", "@babel/runtime": "^7.23.1", "@cucumber/cucumber": "~8.2.0", "@react-native-community/eslint-config": "3.0.1", "@react-native-community/eslint-plugin": "1.1.0", "@react-native/babel-preset": "^0.73.18", "@react-native/eslint-config": "^0.73.1", "@react-native/metro-config": "^0.73.2", "@react-native/typescript-config": "^0.73.1", "@testing-library/jest-dom": "5.16.1", "@testing-library/jest-native": "^5.4.3", "@testing-library/react-hooks": "^8.0.1", "@testing-library/react-native": "^12.3.2", "@types/detox": "^18.1.0", "@types/jest": "^29.0.3", "@types/lodash": "^4.14.195", "@types/react": "^18.2.6", "@types/react-redux": "^7.1.30", "@types/react-test-renderer": "^18.0.6", "@typescript-eslint/eslint-plugin": "^5.9.1", "@typescript-eslint/parser": "^5.9.1", "@welldone-software/why-did-you-render": "^7.0.1", "babel-jest": "^29.6.3", "cross-env": "^7.0.3", "dependency-cruiser": "^13.1.0", "detox": "20.1.0", "eslint": "^8.40.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-flowtype": "8.0.3", "eslint-plugin-import": "^2.25.4", "eslint-plugin-json": "3.1.0", "eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-react": "^7.28.0", "eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-react-native": "4.0.0", "eslint-plugin-react-native-a11y": "3.3.0", "eslint-plugin-simple-import-sort": "10.0.0", "eslint-plugin-sort-keys-fix": "1.1.2", "eslint-plugin-testing-library": "5.10.3", "eslint-plugin-unused-imports": "^2.0.0", "husky": "^7.0.4", "jest": "^29.6.3", "jest-circus": "^27.4.6", "jest-fetch-mock": "^3.0.3", "jest-html-reporter": "^3.4.2", "jest-junit": "^16.0.0", "madge": "^6.1.0", "metro-config": "^0.80.4", "mockdate": "^3.0.5", "msw": "^2.0.3", "prettier": "2.8.8", "react-addons-test-utils": "^15.6.2", "react-devtools": "^4.26.0", "react-native-codegen": "0.0.12", "react-test-renderer": "18.2.0", "reassure": "^0.9.1", "rimraf": "^5.0.1", "ts-jest": "^29.1.1", "typescript": "^5.0.4", "whatwg-fetch": "^3.6.17" } ``` Errors: ![image](https://github.com/microsoft/react-native-windows/assets/4019053/b4421a08-528d-4dfb-8336-450352e49ea6) ![image](https://github.com/microsoft/react-native-windows/assets/4019053/ff99bd93-438f-428d-a026-6c7ddab52164) ![image](https://github.com/microsoft/react-native-windows/assets/4019053/886d88b1-8fd0-4cd2-80c5-98f393313664) ![image](https://github.com/microsoft/react-native-windows/assets/4019053/d328c8c8-a0ac-42bf-8130-4468c2b6dad1)
acoates-ms commented 5 months ago

It looks like you are using a lot of community modules, many of which do not yet have react-native-windows support.

jonthysell commented 5 months ago

This looks like a community module issue, perhaps @react-navigation or react-native-bootsplash as seen in the stack trace. Do either of those support windows? Can you provide a minimal repro of the issue that just uses RNW? If it only repros when adding those modules, you should file this bug on their repos.

microsoft-github-policy-service[bot] commented 5 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.