Heyy! i have a problem while using fs in typescript file... Thats return me this error !
font.tsx:11 Uncaught TypeError: (0 , fs__WEBPACK_IMPORTED_MODULE_2__.readdirSync) is not a function
at ./src/Tools/font.tsx (font.tsx:11:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at ./App.tsx (bundle.js:24:77)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at ./node_modules/expo/AppEntry.js (styleToBarStyle.web.ts:19:1)
at __webpack_require__ (bootstrap:24:1)
at startup:6:1
at startup:6:1
Code part:
import {readdirSync} from 'fs';
import React from "react";
import { useFonts } from 'expo-font';
import * as SplashScreen from 'expo-splash-screen';
const fontDir = '../../assets/fonts/';
const fonts = readdirSync(fontDir);