wix / react-native-ui-lib

UI Components Library for React Native
https://wix.github.io/react-native-ui-lib/
MIT License
6.59k stars 717 forks source link

error: Error: Cannot resolve ./src/components/textField/TextFieldMigrator after upgrading to 7.11 or higher #2965

Open TNAJanssen opened 9 months ago

TNAJanssen commented 9 months ago

Description

When i upgrade from react-native-ui-lib from 7.10 to 7.11 or higher, it will not build and give me this error.

Related to

Steps to reproduce

Start new Expo project and install react-native-ui-lib

Expected behavior

Start the project

Actual behavior

Web Bundling failed 15117ms (index.js) error: Error: Cannot resolve ./src/components/textField/TextFieldMigrator at firstResolver (/Users/tnajanssen/Projects/BasSoftware/bas-software/node_modules/@nx/expo/plugins/metro-resolver.js:33:15) at firstResolver (/Users/tnajanssen/Projects/BasSoftware/bas-software/node_modules/@expo/cli/src/start/server/metro/withMetroResolvers.ts:108:16) at resolveRequest (/Users/tnajanssen/Projects/BasSoftware/bas-software/node_modules/@expo/cli/src/start/server/metro/withMetroResolvers.ts:137:16) at Object.resolve (/Users/tnajanssen/Projects/BasSoftware/bas-software/node_modules/metro-resolver/src/resolve.js:32:12) at ModuleResolver.resolveDependency (/Users/tnajanssen/Projects/BasSoftware/bas-software/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:73:31) at DependencyGraph.resolveDependency (/Users/tnajanssen/Projects/BasSoftware/bas-software/node_modules/metro/src/node-haste/DependencyGraph.js:231:43) at /Users/tnajanssen/Projects/BasSoftware/bas-software/node_modules/metro/src/lib/transformHelpers.js:156:21 at resolveDependencies (/Users/tnajanssen/Projects/BasSoftware/bas-software/node_modules/metro/src/DeltaBundler/buildSubgraph.js:42:25) at visit (/Users/tnajanssen/Projects/BasSoftware/bas-software/node_modules/metro/src/DeltaBundler/buildSubgraph.js:83:30)

Environment

Affected platforms

TNAJanssen commented 9 months ago

Does somebody have an idea how to fix this? Because version 7.10 has issues with Android not starting on production, so i must upgrade but this issue is holding me back.

TNAJanssen commented 9 months ago

Found the issue, when importing from react-native-ui-lib/textField you will get this error.

When importing from react-native-ui-lib you won't

alwye commented 8 months ago

Apparently another option is

import TextField from 'react-native-ui-lib/textFieldOld'

Currently looking through the commits as this broke our integration as well

Edit: there's even more problems using textFieldOld, and this definitely needs fixing