Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.3.0 is not compatible with Expo FileSystem #112

Open
trajano opened this issue Oct 29, 2024 · 1 comment
Open

5.3.0 is not compatible with Expo FileSystem #112

trajano opened this issue Oct 29, 2024 · 1 comment

Comments

@trajano
Copy link

trajano commented Oct 29, 2024

This example used to work

import * as FileSystem from 'expo-file-system';
import { InteractionManager } from 'react-native';
import { fileAsyncTransport, logger } from 'react-native-logs';

const consoleLog = logger.createLogger({
  transport: fileAsyncTransport,
  transportOptions: {
    FS: FileSystem,
    fileName: `logs_${new Date().toLocaleDateString()}.txt`,
  },
  asyncFunc: InteractionManager.runAfterInteractions,
});

But now it's complaining that

error TS2322: Type 'typeof import("C:/p/expo-experiments/node_modules/expo-file-system/build/index")' is not assignable to type 'RNFS | EXPOFS'.
Type 'typeof import("C:/p/expo-experiments/node_modules/expo-file-system/build/index")' is missing the following properties from type 'EXPOFS': DocumentDirectoryPath, appendFile

@trajano
Copy link
Author

trajano commented Oct 29, 2024

What you likely need to do is remove the never lines in the type at least to get it to pass the typing.

  DocumentDirectoryPath: never;

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

No branches or pull requests

1 participant