React-native: Unable to resolve module LinkedStateMixin

Created on 23 Dec 2015  路  5Comments  路  Source: facebook/react-native

I could not launch sample app in simulator.

Repro(s)

$ npm install -g react-native-cli
$ react-native init app

$ cd AwesomeProject
Open ios/app.xcodeproj and hit run in Xcode.

// get the following errors
2015-12-23 11:40:01.358 [error][tid:main] Unable to resolve module LinkedStateMixin from /Users/thachp/Code/mobile/node_modules/react-native/Libraries/react-native/react-native.js: Invalid directory /Users/node_modules/LinkedStateMixin
2015-12-23 11:40:35.101 [error][tid:main] Unable to resolve module LinkedStateMixin from /Users/thachp/Code/mobile/node_modules/react-native/Libraries/react-native/react-native.js: Invalid directory /Users/node_modules/LinkedStateMixin
2015-12-23 11:40:36.058 [error][tid:main] Unable to resolve module LinkedStateMixin from /Users/thachp/Code/mobile/node_modules/react-native/Libraries/react-native/react-native.js: Invalid directory /Users/node_modules/LinkedStateMixin
Locked

Most helpful comment

The main reason for this error (right now) has to do with the fact that RN 0.21+ now has React as a peer dependency. You now need to install React as a dependency of your project, so npm install react --save is what solves this specific issue.

All 5 comments

Hey thachp, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using, as well as the platform you're on e.g.- Android, iOS. Thank you for your contributions!

@thachp I just followed the steps and can't reproduce the errors. Did you manage to get it working?

Related to #4968 . Let's track it there.

The main reason for this error (right now) has to do with the fact that RN 0.21+ now has React as a peer dependency. You now need to install React as a dependency of your project, so npm install react --save is what solves this specific issue.

@dsibiski Receiving this exact issue with [email protected] I had installed. I believe this is a inconsistency issue with R and RN.

It looks like this is where 15._._* branches from 0.1_._* according to a specific comment at Reacts recent releases

LinkedStateMixin and valueLink are now deprecated due to very low popularity. If you need this, you can use a wrapper component that implements the same behavior

I installed react@^0.14.2 and the issue was resolved.

Was this page helpful?
0 / 5 - 0 ratings