Closed gghangura closed 11 months ago
Given the package.json of UI-Kitten, it seems to require React 18. Try to upgrade your project to use React 18, let me know if that works for you.
I will give it a try.
I will give it a try.
Have you resolved it?
this didn’t solve the issue for me
I have the same issue
The same issue
same issue
For me was enough remove the ^ char from the ui-kitten deps in the package.json
Because of restrictions on my environment (can't change package versions) , and because I only need to test something, I manually fixed this problem inside the node_modules/@ui-kitten. Resolving a problem at a time I have the application running on android.
Then the process is: 1- take note of the file that is with errors. 2- add import React from 'react'; at the top of that file.
for instance those files: node_modules/@ui-kitten/components/theme/application/applicationProvider.component.js
"use strict";
/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
import React from 'react'; //<--- I added this. ------
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
when resolved, another file with errors is reported, next file:
other files:
I think react / react-native recent versions implicitly include this import.
Still facing the issue with "react": "^18.2.0", "react-native": "^0.72.4", "@eva-design/eva": "2.2.0", "@ui-kitten/components": "5.3.1", "@ui-kitten/eva-icons": "5.3.2",
Anyone have fix for this error?
🐛 Bug Report
I updated ui-kitten/components and ui-kitten/eva-icons from 5.1.2 to 5.3.0 and I am getting the following error.
ERROR ReferenceError: Can't find variable: React
This error is located at: in ApplicationProvider (at native/index.js:54) in ThemeWrapper (at native/index.js:36) in Provider (at native/index.js:35) in App (at App.js:16) in App (at gestureHandlerRootHOC.tsx:13) in GestureHandlerRootView (at GestureHandlerRootView.android.tsx:14) in GestureHandlerRootView (at gestureHandlerRootHOC.tsx:12) in gestureHandlerRootHOC(App) (at renderApplication.js:50) in RCTView (at View.js:32) in View (at AppContainer.js:92) in RCTView (at View.js:32) in View (at AppContainer.js:119) in AppContainer (at renderApplication.js:43) in ShadowHQ(RootComponent) (at renderApplication.js:60)
The error looks to be on line 93 in applicationProvider.component.js.
Here is my code
To Reproduce
Just updated the project that worked with 5.1.2.
Expected behavior
the application to run without errors.
Link to runnable example or repository (highly encouraged)
UI Kitten and Eva version
Environment information
System: OS: macOS 13.4 CPU: (10) arm64 Apple M1 Pro Binaries: Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node Yarn: 1.22.19 - ~/.yarn/bin/yarn npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm SDKs: iOS SDK: Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4 IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9123335 Xcode: 14.3/14E222b - /usr/bin/xcodebuild npmPackages: react: 17.0.2 => 17.0.2 react-native: 0.68.3 => 0.68.3