Skip to content

Wrong internal dependency tree for beta versions #4680

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

Closed
Aprillion opened this issue Mar 10, 2017 · 2 comments
Closed

Wrong internal dependency tree for beta versions #4680

Aprillion opened this issue Mar 10, 2017 · 2 comments

Comments

@Aprillion
Copy link
Contributor

Version

4.0.0-beta.7 (or any 4.x version lower than the current @next)

Steps to reproduce

  1. in package.json of an actual project, use an exact-version dependency, e.g. "react-router-dom": "4.0.0-beta.7"
  2. wait until a newer version is released, beta.8, before installing (e.g. when continuous integration runs npm install without recycling node_modules)
  3. run npm install

Expected Behavior

├─┬ [email protected] 
│ ├─┬ ...
│ └── [email protected]

No runtime errors.

Actual Behavior

Wrong dependency to beta.8:

├─┬ [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ └── [email protected] 

Random runtime errors, nothing is rendered, e.g.:

Uncaught TypeError: Cannot read property 'path' of undefined
    at Switch.js:53
    at forEachSingleChild (ReactChildren.js:51)
    at traverseAllChildrenImpl (traverseAllChildren.js:77)
    at traverseAllChildrenImpl (traverseAllChildren.js:93)
    at traverseAllChildren (traverseAllChildren.js:172)
    at Object.forEachChildren [as forEach] (ReactChildren.js:71)
    at Switch.render (Switch.js:51)
    at ReactCompositeComponent.js:796
    at measureLifeCyclePerf (ReactCompositeComponent.js:75)
    at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (ReactCompositeComponent.js:795)
@Aprillion
Copy link
Contributor Author

workaround:

  "dependencies": {
    "react-router": "4.0.0-beta.7",
    "react-router-dom": "4.0.0-beta.7",
  },

will install correctly:

├─┬ [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ └── [email protected] 
├── [email protected] 

@timdorr
Copy link
Member

timdorr commented Mar 10, 2017

Dupe of #4656

@timdorr timdorr closed this as completed Mar 10, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants