Skip to content Skip to sidebar Skip to footer

React-native Error: Unable To Resolve Module `accessibilityinfo`

I'm new in React-native I have followed all the instruction when I try to build my first app I got this error . I have clear catch restart npm but still got this error. The develop

Solution 1:

That error is because of your react native project version.

You have to create your project like this by this version for now --->

react-native init ProjectName --version 0.55.4

Just wait for next version of React Native to let them fix that problem.

Solution 2:

See dependencies & devDependencies your package.json file if your find react native version 0.56 like this ---->

"react-native":"0.56.0"

in dependencies then change it to

"react-native":"0.55.4"

and in devDependencies change

"babel-preset-react-native":"5",

to

"babel-preset-react-native":"4.0.0",

and finally run

npm install

Solution 3:

Seems like downgrading react-native version will fix the issue. Are you using the latest 0.56.1? New releases are pretty unstable especially if you are running Windows.

Downgrading to 0.55.4 should fix your problem: npm install react-native@0.55.4

You can take a look at this very similar issue: https://github.com/facebook/react-native/issues/14209

Solution 4:

I assume you are using Windows. I got the same error lately and when I searched for it on github issues of react native, saw that people changed their package.json file. What works for my case is below, you can adapt it to your needs;

{"name":"AwesomeProject","version":"0.0.1","private":true,"scripts":{"start":"node node_modules/react-native/local-cli/cli.js start","test":"jest"},"dependencies":{"react":"16.3.1","react-native":"0.55.4"},"devDependencies":{"babel-jest":"22.4.4","babel-preset-react-native":"4.0.0","jest":"22.4.4","react-test-renderer":"16.3.1"},"jest":{"preset":"react-native"}}

Do not forget to delete your node_modules folder first, then change your package.json similar to above, then finally run npm install.

Post a Comment for "React-native Error: Unable To Resolve Module `accessibilityinfo`"