commissure / redbox-react

:red_circle: A redbox (rsod) component to display your JavaScript errors.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken semver

madjam002 opened this issue · comments

A patch version of redbox-react was published an hour ago but the peer dependency was changed to only support React 15.

Our CI is now failing with:

error   17-Jun-2016 16:17:59    npm ERR! peerinvalid The package react@0.14.8 does not satisfy its siblings' peerDependencies requirements!
...
error   17-Jun-2016 16:17:59    npm ERR! peerinvalid Peer redbox-react@1.2.7 wants react@^15.0.0
...

Can we change this to a major version bump? Dropping support for React 0.14 is a breaking change.
It would be good if we could get a patch version on the v1 branch which is just an old version which supports React 0.14 so that we don't break compatibility for other users.

Thanks

Same issue here. After uploading a new container, this issue occured during building:

´´´
npm ERR! peer dep missing: react@^15.0.0, required by redbox-react@1.2.7
npm ERR! peer dep missing: react@^15.1.0, required by react-dom@15.1.0
´´´

And then react-transform-catch-errors would stop working. Just fix the version to the previous (or upgrade react to avoid this issues.

Yup we've locked down to a previous version, would be nice if this was fixed here though too.

Yes, can we please change this to a major version? We have some dependencies (react-swipeable-views for example) that in turn depends on redbox-react. We cannot even lock down the version.

Sorry for this breaking change! This one slipped through the cracks. Unfortunately, also no one besides me caught it on the PR. I will try to fix this as soon as I'm back at my computer.

What it be better to bring back react 0.14 support? If so, as a fix or major change?

Dear all, I'm sorry for breaking your builds. I decided to release a new fix version (=minor) that reenables support for react 0.14. Your broken builds should automatically unbreak this way. Please let me know what you think about this and if your builds are OK now.

commented

@davidpfahler: Thanks for your work. Unfortunately I'm still seeing the unmet peer dep with 1.2.8 on a react 14 project:

├─┬ redbox-react@1.2.8 
│ ├── UNMET PEER DEPENDENCY react@^15.1.0

@c089 Do you know why? Afaik, the changes I made should be sufficient. I'd need more detail to investigate your problem.

commented

Unfortunately no idea yet, I was hoping it's an obvious thing ;) I'll try to isolate the problem later today.

A project I'm working on is using React 0.14 and has recently started failing on CI with the error message:

Error: The package react does not satisfy its siblings' peerDependencies requirements!

I ran npm ls react-dom from the root project directory:

├─┬ babel-preset-react-hmre@1.1.1
│ └─┬ redbox-react@1.2.8
│   ├── UNMET PEER DEPENDENCY react@^15.1.0
│   └── react-dom@15.1.0
└── react-dom@0.14.8

npm ERR! peer dep missing: react@^15.1.0, required by react-dom@15.1.0

It looks like v1.2.8 of redbox-react requires react-dom: ^15.1.0 as a dependency, and I think this may be the problem.

I cloned redbox-react and babel-preset-react-hmre and made the following changes locally:

  • redbox-react: loosened the react-dom dependency: "react-dom": "^0.14.0 || ^15.0.0"
  • babel-preset-react-hmre: changed package.json to use the updated redbox-react dependency
  • my project: changed package.json to use the updated babel-preset-react-hmre dependency

I ran rm -rf node_modules && npm install on my project locally, and it succeeded. I'll open a PR with the changes. 🎉