Skip to content

fix: import FileSystem expo-file-system/legacy (react-native)#1691

Open
bhardwajparth51 wants to merge 2 commits into
appwrite:mainfrom
bhardwajparth51:fix-expo-sdk-55-file-system-import
Open

fix: import FileSystem expo-file-system/legacy (react-native)#1691
bhardwajparth51 wants to merge 2 commits into
appwrite:mainfrom
bhardwajparth51:fix-expo-sdk-55-file-system-import

Conversation

@bhardwajparth51

Copy link
Copy Markdown
Contributor

🐛 Problem & Fix

In Expo SDK 55 (expo-file-system@55.x), Expo moved legacy file system methods like readAsStringAsync and writeAsStringAsync to the expo-file-system/legacy subpath export.

Importing readAsStringAsync directly from top-level expo-file-system causes runtime crashes during chunked file uploads (> 5MB) on Expo SDK 55 applications.

This PR updates the template import in templates/react-native/src/services/template.ts.twig to import from expo-file-system/legacy, restoring compatibility for file uploads on Expo SDK 55.

Relates to appwrite/sdk-for-react-native#112

@greptile-apps

greptile-apps Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Updates generated React Native services to use Expo’s legacy file-system export and adds the corresponding Rollup test alias.

  • Imports FileSystem from expo-file-system/legacy for Expo SDK 55 compatibility.
  • Maps the legacy subpath to the existing browser-compatible shim in React Native e2e builds.

Confidence Score: 5/5

The PR appears safe to merge.

The added exact-match Rollup alias addresses the previously reported shim bypass, and no blocking failure remains.

Important Files Changed

Filename Overview
templates/react-native/src/services/template.ts.twig Switches generated React Native services to Expo’s legacy file-system API subpath.
tests/e2e/languages/react-native/rollup.test.config.mjs Adds the exact legacy-subpath alias needed to preserve the existing e2e file-system shim.

Reviews (2): Last reviewed commit: "test(react-native): update rollup alias ..." | Re-trigger Greptile

Comment thread templates/react-native/src/services/template.ts.twig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant