Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init new project error with React-Native 0.43-rc4 #13078

Closed
hnzlk2014 opened this issue Mar 22, 2017 · 10 comments
Closed

init new project error with React-Native 0.43-rc4 #13078

hnzlk2014 opened this issue Mar 22, 2017 · 10 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@hnzlk2014
Copy link

NPM version: 4.4.1
Xcode version: 8.2 (8C38)
React Native version: 0.43-rc1~4
Platform: iOS
Operating System: MacOS os x EI Capitan

react-native 0.42.3 no problem.

react-native init --version="0.43.0-rc.4" FlatListTest4

error message:
2017-03-22 18:24:09.965 [warn][tid:NSOperationQueue 0x618000030700 :: NSOperation 0x61800004f390 (QOS: DEFAULT)][RCTBatchedBridge.m:113] Failed to load source: Error Domain=JSServer Code=500 "Unable to resolve module react/lib/ReactComponentWithPureRenderMixin from /Users/zlk/Downloads/ReactNative/FlatListTest4/node_modules/react-native/Libraries/react-native/react-native-implementation.js: Module does not exist in the module map or in these directories:
/Users/zlk/Downloads/ReactNative/FlatListTest4/node_modules/react/lib

This might be related to #4968
To resolve try the following:

  1. Clear watchman watches: watchman watch-del-all.
  2. Delete the node_modules folder: rm -rf node_modules && npm install.
  3. Reset packager cache: rm -fr $TMPDIR/react-* or npm start --reset-cache." UserInfo={stack=(
    {
    file = "";
    lineNumber = 0;
    methodName = "";
    }
    ), NSLocalizedDescription=Unable to resolve module react/lib/ReactComponentWithPureRenderMixin from /Users/zlk/Downloads/ReactNative/FlatListTest4/node_modules/react-native/Libraries/react-native/react-native-implementation.js: Module does not exist in the module map or in these directories:
    /Users/zlk/Downloads/ReactNative/FlatListTest4/node_modules/react/lib

This might be related to #4968
To resolve try the following:

  1. Clear watchman watches: watchman watch-del-all.
  2. Delete the node_modules folder: rm -rf node_modules && npm install.
  3. Reset packager cache: rm -fr $TMPDIR/react-* or npm start --reset-cache.}
    2017-03-22 18:24:09.978 [fatal][tid:main] Unable to resolve module react/lib/ReactComponentWithPureRenderMixin from /Users/zlk/Downloads/ReactNative/FlatListTest4/node_modules/react-native/Libraries/react-native/react-native-implementation.js: Module does not exist in the module map or in these directories:
    /Users/zlk/Downloads/ReactNative/FlatListTest4/node_modules/react/lib

This might be related to #4968
To resolve try the following:

  1. Clear watchman watches: watchman watch-del-all.
  2. Delete the node_modules folder: rm -rf node_modules && npm install.
  3. Reset packager cache: rm -fr $TMPDIR/react-* or npm start --reset-cache.
@ncuillery
Copy link
Contributor

ncuillery commented Mar 22, 2017

I confirm the problem.

It's is due to the React version 16.0.0-alpha.5 published on NPM yesterday.

Fix your React version to 16.0.0-alpha.4 (EDIT: 16.0.0-alpha.3, my bad) in your package.jsonand re-install the dependencies.

It's a serious issue though, because all existing projects using 0.43-rc* are concerned.

@hnzlk2014
Copy link
Author

npm ERR! notarget No compatible version found: [email protected]
npm ERR! notarget Valid install targets:
npm ERR! notarget 1.0.0, 1.1.0, 15.3.0, 15.3.1-rc.1, 15.3.1-rc.2, 15.3.1, 15.3.2-rc.1, 15.3.2, 15.4.0-rc.1, 15.4.0-rc.2, 15.4.0-rc.3, 15.4.0-rc.4, 15.4.0, 15.4.1, 15.4.2, 16.0.0-alpha, 16.0.0-alpha.0, 16.0.0-alpha.2, 16.0.0-alpha.3, 16.0.0-alpha.5

@hnzlk2014
Copy link
Author

16.0.0-alpha.3 is ok.

gaearon referenced this issue Mar 23, 2017
Reviewed By: sebmarkbage

Differential Revision: D4615201

fbshipit-source-id: fc62b44aa866e096faa1cb048db361bb8c6ab11f
@gaearon
Copy link
Collaborator

gaearon commented Mar 23, 2017

I think the problem is that we didn't pin the React version during one of the previous syncs: 24a7665#commitcomment-21457443. So now every time we release a new alpha of react (potentially with breaking changes because it's an alpha), React Native RC that contains ~ in the peer dependency will let the users happily upgrade to a broken version.

For people in this thread, the solution is to pin your react version in package.json to 16.0.0-alpha.4. Your code might not work with 16.0.0-alpha.5 until we do another sync.

@gaearon
Copy link
Collaborator

gaearon commented Mar 23, 2017

(And we need to pin React versions in the future, just like we did before. I'm not sure why we broke the pattern, and whether it was intentional or not.)

@javache
Copy link
Member

javache commented Mar 23, 2017

The package build issue should be resolved as far as I'm aware with a2cfea1

@gaearon
Copy link
Collaborator

gaearon commented Mar 23, 2017

The followup we agreed on is @bvaughn will submit a PR removing ~ from package.json and coordinate with @mkonicek to get a similar change into RC branch.

@gaearon
Copy link
Collaborator

gaearon commented Mar 23, 2017

Fix up in #13121.

@dcp12345678
Copy link

The solution suggested by ncuillery did not work for me. I still get same "No bundle url present" error.

abdulmuneer22 pushed a commit to abdulmuneer22/skydreamer_travel_app that referenced this issue Apr 5, 2017
@sergiofraile
Copy link

Same in here. Even a new project with react-native 0.43.3 gives me the same issue.

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants