shoutem/ui

Unable to resolve "warnOnce" from "node_modules/@shoutem/ui/node_modules/react-native/Libraries/react-native/react-native-implementation.js"

JulianKingman opened this issue · 8 comments

I'm using Expo 37, and just updated to shoutem ui v2, and I'm getting the following error:

Unable to resolve "warnOnce" from "node_modules/@shoutem/ui/node_modules/react-native/Libraries/react-native/react-native-implementation.js"
Failed building JavaScript bundle.

Related issue (tried everything there):
facebook/react-native#23943

Same error, I try all solutions in facebook/react-native#23943 but does not work.

Same issue, How can we solve this?

A bad workaround:
in node_modules/@shoutem/ui/node_modules/react-native/Libraries/react-native/react-native-implementation.js
replace const warnOnce = require('warnOnce'); with const warnOnce = console.warn

I'm using Expo SDK 37, wanting to update to SDK 38.

I got the same error, so I downgraded (both SDK and Shoutem UI theme) to "@shoutem/ui": "2.0.3". My app is running in emulator.

Edit: After upgrading the Shoutem UI theme to 2.0.4 (with Expo SDK 38), the error appears. Downgrading to 2.0.3 is fine.

A bad workaround:
in node_modules/@shoutem/ui/node_modules/react-native/Libraries/react-native/react-native-implementation.js
replace const warnOnce = require('warnOnce'); with const warnOnce = console.warn

I tried that but then I get:
Unable to resolve "AccessibilityInfo" from "node_modules\@shoutem\ui\node_modules\react-native\Libraries\react-native\react-native-implementation.js"

On RN 61, with native building apps (non-expo). Downgrading to 2.0.3 also fixed for me.

@cayleyh 2.02 did it for me but it has a vulnerable dependency.

Sorry @projectdallas :(
I ran into the same issue, and couldn't make any headway. My best guess is that somewhere in the dependencies is a package that relies on an old version of react native, maybe react-native-photo-view?

I refactored my whole project into react-native-paper. It was a huge pain, and a sad loss for an API I really liked, but I have to admit that shoutem/ui appears to be dead.

rkv5 commented

Please see Shoutem UI of version 4.0.6. Updated to this version, and the problem disappeared.