ENOENT: no such file or directory, scandir error on loading app

I get the following error after upgrading expo version 31 to 33 in a detached project.

ENOENT: no such file or directory, scandir ‘/home/testuser/Documents/test-app/src/assets/fonts/node_modules/native-base/Fonts’

1 Like

Hi @udithakasun, have you already looked through the release notes of each SDK (32 and 33)?

Shell-app.bundle contains these requested paths

Resolved the issue by upgrading native-base and @expo/vector-icons

1 Like

Updated my project, and trying to build again and have the same issue… I tried updating native-base & @expo/vector-icons to their latest but no luck. Any suggestions?

if you have imported following fonts add replace with following and be sure to import them in App.js

import FontAwesome from '@expo/vector-icons/fonts/FontAwesome.ttf';
import Ionicons from '@expo/vector-icons/fonts/Ionicons.ttf';
import Roboto from 'native-base/Fonts/Roboto.ttf';
import RobotoMedium from 'native-base/Fonts/Roboto_medium.ttf';

Use previous version vector icons if you can upgrade native base only if needed

Which native-base version did you update to?

2.3.1

After upgrading the sdk version from 32 to 33, I had a similar problem with Ant Design icons. Somehow the require path is not searching from node_modules/ anymore but from the current directory.

The only way I found to solve the issue is to change the path accordingly, in my case from @ant-design/icons-react-native/fonts/antoutline.ttf to ../../../node_modules/@ant-design/icons-react-native/fonts/antoutline.ttf, which is ugly but works.

1 Like

@remeus same s**t, bro. I was forced to change my path to font to ugly absolute paths.

Hey @sirmong and @remeus,

This was an open GH issue, but was closed since there were no reproducible examples shared (if you could provide one here, we can definitely open an issue for it)

The fix there was related to the file format, but it looks like you’re using .ttf already