react-native-ui-lib icon indicating copy to clipboard operation
react-native-ui-lib copied to clipboard

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

Open TNAJanssen opened this issue 1 year ago • 3 comments

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

  • [X] Components

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

  • React Native version: 0.73.4
  • React Native UI Lib version: 7.11

Affected platforms

  • [X] Android
  • [X] iOS
  • [X] Web

TNAJanssen avatar Feb 29 '24 14:02 TNAJanssen

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 avatar Mar 06 '24 11:03 TNAJanssen

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

TNAJanssen avatar Mar 06 '24 11:03 TNAJanssen

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

alwye avatar Mar 31 '24 20:03 alwye

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 31 '25 23:01 stale[bot]