The syntax "import { Font } from 'expo-font'" is deprecated.

I used SDK30 and then I made an update to SDK33 And as the usage of the module changed, it changed everything. But it keeps warning me.

The syntax "import { Font } from 'expo-font'" is deprecated. Use "import * as Font from 'expo-font'" or import named exports instead. Support for the old syntax will be removed in SDK 33.
- node_modules/expo/build/environment/muteWarnings.fx.js:17:23 in warn
- node_modules/expo-font/build/Font.js:105:16 in get
- node_modules/@expo/vector-icons/createIconSet.js:16:20 in Icon
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:7324:26 in constructClassInstance
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:11479:6 in updateClassComponent
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:17276:21 in performUnitOfWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:17316:41 in workLoop
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:17417:15 in renderRoot
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:18423:17 in performWorkOnRoot
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:18324:24 in performWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:18285:14 in performSyncWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:18169:19 in requestWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:17969:16 in scheduleWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:6934:17 in enqueueSetState
- node_modules/react/cjs/react.development.js:335:31 in setState
- node_modules/@react-navigation/native/src/createAppContainer.js:393:22 in dispatch
- node_modules/@react-navigation/core/lib/module/getChildNavigation.js:1:1529 in <unknown>
* screen/LoginScreen/StartScreen.js:123:47 in <unknown>
- node_modules/promise/setimmediate/core.js:37:14 in tryCallOne
- node_modules/promise/setimmediate/core.js:123:25 in <unknown>
- ... 8 more stack frames from framework internals

I changed where I used this part.
import { Font } from "expo"; ====> import * as Font from "expo-font";

But it’s same warning from me. I have a ‘nativa-base’ module and “@expo vector-icons” module.
Is this causing a warning to me? So how can you get rid of it?

“native-base”: “^2.8.2”,
@expo/vector-icons”: “^8.1.0”,

   await Font.loadAsync({
      Roboto: require("native-base/Fonts/Roboto.ttf"),
      Roboto_medium: require("native-base/Fonts/Roboto_medium.ttf"),
      Ionicons: require("native-base/Fonts/Ionicons.ttf")

I need your solution

I removed this warning by updating “@expo / vector-icons” to the latest version. Maybe it was updated with the version of Expo, but I installed it independently, so this is what happened.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.