RocketChat / Rocket.Chat.ReactNative

Rocket.Chat mobile clients
https://rocket.chat
MIT License
1.91k stars 1.14k forks source link

Problem with setting up the project image picker issue #5761

Open needJobCoder opened 5 days ago

needJobCoder commented 5 days ago

I just ran these two command

yarn install yarn android

and this error occurred something related to the image picker `needJobCoder@DESKTOP-G3MCU14 MINGW64 /c/openSource/rocker-react-native/Rocket.Chat.ReactNative/Rocket.Chat.ReactNative (develop) $ yarn react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res yarn run v1.22.21 $ C:\openSource\rocker-react-native\Rocket.Chat.ReactNative\Rocket.Chat.ReactNative\node_modules.bin\react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res warn Package react-native-math-view contains invalid configuration: "dependency.assets" is not allowed. Please verify it's properly linked using "npx react-native config" command and contact the package maintainers about this. Welcome to Metro v0.80.6 Fast - Scalable - Integrated

error Unable to resolve module @react-native-community/picker from C:\openSource\rocker-react-native\Rocket.Chat.ReactNative\Rocket.Chat.ReactNative\node_modules\react-native-ui-lib\lib\components\WheelPicker\index.js: @react-native-community/picker could not be found within the project or in these directories: node_modules\react-native-ui-lib\node_modules node_modules 3 | import React, {Component} from 'react'; 4 | import {DeviceEventEmitter, requireNativeComponent, StyleSheet, View} from 'react-native';

5 | import {Picker} from '@react-native-community/picker'; | ^ 6 | import WheelPickerItem from './WheelPickerItem'; 7 | import {Constants} from '../../../src/helpers'; 8 | import {Typography, Colors} from '../../../src/style';. Error: Unable to resolve module @react-native-community/picker from C:\openSource\rocker-react-native\Rocket.Chat.ReactNative\Rocket.Chat.ReactNative\node_modules\react-native-ui-lib\lib\components\WheelPicker\index.js: @react-native-community/picker could not be found within the project or in these directories: node_modules\react-native-ui-lib\node_modules node_modules 3 | import React, {Component} from 'react'; 4 | import {DeviceEventEmitter, requireNativeComponent, StyleSheet, View} from 'react-native'; 5 | import {Picker} from '@react-native-community/picker'; | ^ 6 | import WheelPickerItem from './WheelPickerItem'; 7 | import {Constants} from '../../../src/helpers'; 8 | import {Typography, Colors} from '../../../src/style'; at ModuleResolver.resolveDependency (C:\openSource\rocker-react-native\Rocket.Chat.ReactNative\Rocket.Chat.ReactNative\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:138:15) at DependencyGraph.resolveDependency (C:\openSource\rocker-react-native\Rocket.Chat.ReactNative\Rocket.Chat.ReactNative\node_modules\metro\src\node-haste\DependencyGraph.js:231:43) at C:\openSource\rocker-react-native\Rocket.Chat.ReactNative\Rocket.Chat.ReactNative\node_modules\metro\src\lib\transformHelpers.js:156:21 at resolveDependencies (C:\openSource\rocker-react-native\Rocket.Chat.ReactNative\Rocket.Chat.ReactNative\node_modules\metro\src\DeltaBundler\buildSubgraph.js:42:25) at visit (C:\openSource\rocker-react-native\Rocket.Chat.ReactNative\Rocket.Chat.ReactNative\node_modules\metro\src\DeltaBundler\buildSubgraph.js:83:30) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 2) at async visit (C:\openSource\rocker-react-native\Rocket.Chat.ReactNative\Rocket.Chat.ReactNative\node_modules\metro\src\DeltaBundler\buildSubgraph.js:92:5) at async Promise.all (index 3) at async visit (C:\openSource\rocker-react-native\Rocket.Chat.ReactNative\Rocket.Chat.ReactNative\node_modules\metro\src\DeltaBundler\buildSubgraph.js:92:5) info Run CLI with --verbose flag for more details. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. `

diegolmello commented 5 days ago

Maybe patch-package was not applied correctly? https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/8b25a168247da333794d1a361059499cd9f1244b/patches/react-native-ui-lib%2B7.2.1.patch#L10 It's triggered on postinstall, but it seems it wasn't triggered correctly on your environment. Try to understand why it wasn't applied or apply everything from patches folder manually.

needJobCoder commented 4 days ago

Maybe patch-package was not applied correctly? https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/8b25a168247da333794d1a361059499cd9f1244b/patches/react-native-ui-lib%2B7.2.1.patch#L10 It's triggered on postinstall, but it seems it wasn't triggered correctly on your environment. Try to understand why it wasn't applied or apply everything from patches folder manually.

Post install and what file in specific in patch ?

needJobCoder commented 4 days ago

https://paste.myst.rs/skuw5ded here is 7.2.1 file

needJobCoder commented 4 days ago

I think there was a change in the library name or something