sdk 41 to 42 upgrade, shows "Unable to resolve module unimodules-permissions-interface"

Please provide the following:

  1. SDK Version: 42
  2. Platforms(Android/iOS/web/all): io
  3. Expo library you have a question on: react-native-unimodules

i upgrade to expo 42 and while trying to run the expo managed app, i get this errror:

Unable to resolve module unimodules-permissions-interface from /Volumes/roshan_1T/MAC/Documents/del_test/bump_version/bumped_to_42/eKaa_app/node_modules/expo-media-library/build/MediaLibrary.js: unimodules-permissions-interface could not be found within the project.

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*
  1 | import { EventEmitter, UnavailabilityError } from '@unimodules/core';
  2 | import { Platform } from 'react-native';
> 3 | import { PermissionStatus, } from 'unimodules-permissions-interface';
    |                                    ^
  4 | import MediaLibrary from './ExponentMediaLibrary';
  5 | const eventEmitter = new EventEmitter(MediaLibrary);
  6 | export { PermissionStatus };

i tried installing " react-native-unimodules" module but it did not work.
Do i need to do all those “pod install” thing as described in this link… i suppose i do not have to because managed expo project handles itself or am i worng???

link: Installing react-native-unimodules - Expo Documentation

What am i doing wrong??

1 Like

Hey @rosnk, you’re correct that you shouldn’t (and do not) have to deal with any pod commands as managed takes care of the native code processes for you. Can you read through the expo-permissions removal paragraph under the Deprecations section in the SDK42 blog post and follow those steps.

Cheers,
Adam

@adamjnav i reviewed the doc, it has link demonstrating removing unnecessary imports in java
import expo.modules.constants.ConstantsPackage;
import expo.modules.permissions.PermissionsPackage;
import expo.modules.filesystem.FileSystemPackage;

my error seems to be in third party module i have been using, here is more descriptive error i got using npm:

iOS Bundling failed 2216ms
Unable to resolve module unimodules-permissions-interface from /Volumes/roshan_1T/MAC/Documents/del_test/bump_version/bumped_to_42/eKaa_app/node_modules/expo-image-picker-multiple/node_modules/expo-media-library/build/MediaLibrary.js: unimodules-permissions-interface could not be found within the project.

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*
  1 | import { EventEmitter, UnavailabilityError } from '@unimodules/core';
  2 | import { Platform } from 'react-native';
> 3 | import { PermissionStatus, } from 'unimodules-permissions-interface';
    |                                    ^
  4 | import MediaLibrary from './ExponentMediaLibrary';
  5 | const eventEmitter = new EventEmitter(MediaLibrary);
  6 | export { PermissionStatus };

i tried installing “react-native-unimodules” but no luck. Any help will be appreciated.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.