UNPKG

react-native-fs-turbo

Version:

React-Native library for working with Android/iOS file system, written using JSI and C++ TurboModules

26 lines (25 loc) 1.04 kB
"use strict"; const BULLET_POINT = "\n* "; function messageWithSuggestions(message, suggestions) { return message + BULLET_POINT + suggestions.join(BULLET_POINT); } export class ModuleNotFoundError extends Error { constructor() { // TurboModule not found, something went wrong! // eslint-disable-next-line no-underscore-dangle if (global.__turboModuleProxy == null) { // TurboModules are not available/new arch is not enabled. // react-native-fs-turbo requires new arch (react-native >0.74) const message = "Failed to create a new RNFSTurbo instance: react-native-fs-turbo requires TurboModules, but the new architecture is not enabled!"; const suggestions = []; const error = messageWithSuggestions(message, suggestions); super(error); return; } const message = "Failed to create a new RNFSTurbo instance."; const suggestions = []; const error = messageWithSuggestions(message, suggestions); super(error); } } //# sourceMappingURL=ModuleNotFoundError.js.map