diff --git a/templates/react-native/src/services/template.ts.twig b/templates/react-native/src/services/template.ts.twig index 2ae198be9c..1a01125a88 100644 --- a/templates/react-native/src/services/template.ts.twig +++ b/templates/react-native/src/services/template.ts.twig @@ -2,7 +2,7 @@ import { Service } from '../service'; import { {{ spec.title | caseUcfirst}}Exception, Client } from '../client'; import type { Models } from '../models'; import type { UploadProgress, Payload } from '../client'; -import * as FileSystem from 'expo-file-system'; +import * as FileSystem from 'expo-file-system/legacy'; import { Platform as RNPlatform } from 'react-native'; {% set added = [] %} diff --git a/tests/e2e/languages/react-native/rollup.test.config.mjs b/tests/e2e/languages/react-native/rollup.test.config.mjs index cc2e90bad7..6d77fb7be9 100644 --- a/tests/e2e/languages/react-native/rollup.test.config.mjs +++ b/tests/e2e/languages/react-native/rollup.test.config.mjs @@ -21,6 +21,10 @@ export default { alias({ entries: [ { find: 'react-native', replacement: 'react-native-web' }, + { + find: 'expo-file-system/legacy', + replacement: path.resolve(__dirname, 'shims/expo-file-system.js'), + }, { find: 'expo-file-system', replacement: path.resolve(__dirname, 'shims/expo-file-system.js'),