Skip to content

UnableToResolveError: Unable to resolve module AccessibilityInfo #14209

Closed
@PhillippOhlandt

Description

@PhillippOhlandt

Description

I basically just cloned an existing project with a minimal setup, did yarn install and node node_modules/react-native/local-cli/cli.js run-ios. It started but the packer failed with:

error: bundling: UnableToResolveError: Unable to resolve module `AccessibilityInfo` from `/Users/phillipp/Work/***/***/node_modules/react-native/Libraries/react-native/react-native-implementation.js`: Module does not exist in the module map or in these directories:
  /Users/phillipp/Work/***/***/node_modules/react-native/node_modules
,   /Users/phillipp/Work/***/***/node_modules

I found get AccessibilityInfo() { return require('AccessibilityInfo'); }, in the /Users/phillipp/Work/***/***/node_modules/react-native/Libraries/react-native/react-native-implementation.js file but I have no clue where it wants to require that from. It seems to be a RN core thing.

Here is the package.json for those who are curious:


{
  "name": "***",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "base64-js": "^1.2.0",
    "react": "^16.0.0-alpha.6",
    "react-native": "^0.44.0",
    "react-native-ble-manager": "^3.2.0",
    "react-native-checkbox": "^1.1.0",
    "react-native-color-picker": "^0.2.1",
    "react-native-drawer": "^2.3.0",
    "react-native-dropdown": "0.0.6",
    "react-native-image-picker": "^0.25.5",
    "react-native-list-popover": "^1.0.5",
    "react-native-modal-picker": "0.0.16",
    "react-native-orientation": "^1.17.0",
    "react-native-router-flux": "^3.37.0",
    "react-native-selectbox": "^0.1.0",
    "react-native-selection": "^1.3.5",
    "react-native-selectme": "^1.2.3",
    "react-native-sound": "^0.9.1",
    "react-native-vector-icons": "^4.0.1"
  },
  "devDependencies": {
    "babel-jest": "18.0.0",
    "babel-preset-react-native": "1.9.1",
    "jest": "18.1.0",
    "react-test-renderer": "~15.4.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

I already tried everything I found on the internet (reinstalling node modules, cleaning npm, yarn and watchman caches, deleting react files from temp dir, etc.)

Additional Information

  • React Native version: ^0.44.0
  • Platform: ios
  • Development Operating System: OSX
  • Dev tools: XCode Version 8.0 (8A218a)

Activity

ne0fite

ne0fite commented on May 26, 2017

@ne0fite

Same issue here. A project I created 2 days ago still works. A new project I created today with react-native init does not. In my case, the difference is the react-native version went from 0.44.0 to 0.44.2. On the new project, if I change the react-native version in package.json to 0.44.0, it works.

lenichols

lenichols commented on May 26, 2017

@lenichols

Same issue suddenly after runing init... :-(

juanchoperezj

juanchoperezj commented on May 26, 2017

@juanchoperezj

Same issue here

hramos

hramos commented on May 26, 2017

@hramos
Contributor

Does this still occur after deleting node_modules then running npm install?

juanchoperezj

juanchoperezj commented on May 26, 2017

@juanchoperezj

@hramos
I tried removing node_modules and reinstalling and it does not work.

Kennytian

Kennytian commented on May 27, 2017

@Kennytian

@hramos Thanks your team work!

Yesterday, I use react-native-git-upgrade my project 0.44.0 to 0.44.1, it ok, perfect. but now, i use react-native-git-upgrade my project 0.44.1 to 0.44.2, same issue here.

I think issue in the react-native 0.44.1 upgrade to 0.44.2

valinaga

valinaga commented on May 27, 2017

@valinaga

same here. but after downgrading from 0.44.2 to 0.44.1 the issue vanished and everything is back to normal.

kingctan

kingctan commented on May 27, 2017

@kingctan

same here.

acomagu

acomagu commented on May 27, 2017

@acomagu

same error on android

vitaliiznak

vitaliiznak commented on May 27, 2017

@vitaliiznak

same on android, removing node_modules and reinstalling and it does not work

luizguilhermefr

luizguilhermefr commented on May 27, 2017

@luizguilhermefr

Same here. Almost entire team stuck by this error.

lcszulpo

lcszulpo commented on May 27, 2017

@lcszulpo

Same here

vinujan59

vinujan59 commented on May 27, 2017

@vinujan59

same here, any solutions?

mkhalil49

mkhalil49 commented on May 27, 2017

@mkhalil49

same here

337 remaining items

rares-lupascu

rares-lupascu commented on Jul 29, 2018

@rares-lupascu

@williamdarkocode the language is not incompetent ... maintainers are ... either incompetent or they really do not give a ... maybe they have already moved to native or flutter and do not care anymore :) ... and when it comes to communication ... they really lack any skill

prashaddey

prashaddey commented on Jul 30, 2018

@prashaddey

Anyone here tried Native Script for Vue..? I'm thinking to convert my projects to Native Script - Vue because React Native is throwing all kinds of errors that I've never seen before. Any suggestion would be very much appriciated.

Johncy1997

Johncy1997 commented on Jul 30, 2018

@Johncy1997

@lahed

I have tried to downgrade react native and installed the matching versions of native-base and react-navigation.It will accept only react-native pure components.Even it does not support react-native-twitter-signin package.It throws next error regarding SDK version.Each and every time it throws different errors..Even i can't delete my project folder.If i try to delete the folder it throws "the source file name(s) are larger than is supported by the file system.."

someone post the accurate solution for all kinds of error.

Tchanu

Tchanu commented on Jul 30, 2018

@Tchanu

0.56 seems broken. Use 0.55.4 instead.

jorius

jorius commented on Jul 31, 2018

@jorius

is there any advance on this? I don't know what to do because if I downgrade react-native to 0.55.4 I get stuck by the issue 19126 and if I stay in 0.56 I cannot compile, run on emulator or do anything and the fixes to the issue 19126 doesn't work for me

PrsRares

PrsRares commented on Jul 31, 2018

@PrsRares

Why is still closed this issue? No one resolved it yet, all are complaining about this problem. How we resolve it?! I already lost a day of work... I dont understand why its closed.

gluons

gluons commented on Jul 31, 2018

@gluons

@PrsRares Maybe they're working in #19953.

PrsRares

PrsRares commented on Jul 31, 2018

@PrsRares

@gluons thx, they didnt make it work, but at least we know now that they cant in this version and it will be fixed in 0.57. Thx.

williamdarkocode

williamdarkocode commented on Aug 1, 2018

@williamdarkocode

Ok. What worked for me was a little crude but I guess it works so why not.

Instead of doing react-native init, make use create react app, and before installing any dependencies or transferring project directories and files, npm run eject. Don't choose expo eject method. When done ejecting, install all dependencies in your projects package.json, and don't run npm audit fix, no matter the amount of peer dependency errors you see. The reason is when you run npm eject, the core dependencies' versions are to best fit your project. When done with dependencies, simply copy and paste project files, and resolve any errors such as 'Cannot find file/ dir' errors.

jarvish21

jarvish21 commented on Aug 1, 2018

@jarvish21

"dependencies": {
"react": "^16.4.1",
"react-native": "^0.55.4"
},
"devDependencies": {
"babel-preset-react-native": "^4.0.0",
},
for me even after having following dependencies the error persisted

the below cmds helped me resolve
cd android
gradle clean
cd ..
react-native run-android

locked as spam and limited conversation to collaborators on Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mmmurf@ryanmcgrath@sjmueller@richa@davidck

        Issue actions

          UnableToResolveError: Unable to resolve module `AccessibilityInfo` · Issue #14209 · facebook/react-native