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

CDN production version is broken #14765

Closed
j055 opened this issue Feb 6, 2019 · 7 comments
Closed

CDN production version is broken #14765

j055 opened this issue Feb 6, 2019 · 7 comments
Assignees
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@j055
Copy link

j055 commented Feb 6, 2019

Hi

This morning all of our sites which use React have stopped working. We use the CDN:

https://unpkg.com/react@16/umd/react.production.min.js

https://unpkg.com/react-dom@16/umd/react-dom.production.min.js

To reproduce download zip and run example from here:

https://reactjs.org/docs/add-react-to-a-website.html

The sites work with the development version but switching to the production version causes script error:

react-dom.production.min.js:134 Uncaught TypeError: Cannot read property 'current' of undefined
    at Vg (react-dom.production.min.js:134)
    at Xc (react-dom.production.min.js:147)
    at ra (react-dom.production.min.js:146)
    at Qc (react-dom.production.min.js:144)
    at Ba (react-dom.production.min.js:142)
    at fh (react-dom.production.min.js:159)
    at Ce (react-dom.production.min.js:159)
    at rb.render (react-dom.production.min.js:214)
    at react-dom.production.min.js:163
    at dh (react-dom.production.min.js:158)
Vg @ react-dom.production.min.js:134
Xc @ react-dom.production.min.js:147
ra @ react-dom.production.min.js:146
Qc @ react-dom.production.min.js:144
Ba @ react-dom.production.min.js:142
fh @ react-dom.production.min.js:159
Ce @ react-dom.production.min.js:159
rb.render @ react-dom.production.min.js:214
(anonymous) @ react-dom.production.min.js:163
dh @ react-dom.production.min.js:158
ad @ react-dom.production.min.js:163
render @ react-dom.production.min.js:216
(anonymous) @ like_button.js:25

Workaround

Specify previous version:

https://unpkg.com/react@16.7.0/umd/react.production.min.js

https://unpkg.com/react-dom@16.7.0/umd/react-dom.production.min.js

Please advise

Thanks

Andrew

@bvaughn bvaughn self-assigned this Feb 6, 2019
@bvaughn
Copy link
Contributor

bvaughn commented Feb 6, 2019

At a quick glance, I think that line is referring to ReactCurrentOwner

@bvaughn
Copy link
Contributor

bvaughn commented Feb 6, 2019

Changing react.production.js and react-dom.production.js to react.production.min.js and react-dom.production.min.js works for me. Maybe it was a transient unpkg issue?

Can you confirm that you're still seeing this issue?

@bvaughn bvaughn added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Feb 6, 2019
@gaearon
Copy link
Collaborator

gaearon commented Feb 6, 2019

@bvaughn
Copy link
Contributor

bvaughn commented Feb 6, 2019

I think this issue highlights the fact that splitting the current owner/dispatcher refs (#14548) probably broke peer dependencies. 😦

Maybe we could do a bugfix release that patches backwards compat?

@j055
Copy link
Author

j055 commented Feb 6, 2019

Yes. My test is working again without changing anything.

@bvaughn
Copy link
Contributor

bvaughn commented Feb 6, 2019

To be clear, an older version of the react package will not work with a newer renderer package version– because it's trying to access a ReactCurrentDispatcher which does not exist as a separate ref.

An older renderer will work with a newer version of the react package.

@bvaughn
Copy link
Contributor

bvaughn commented Feb 6, 2019

This specific issue was caused by a transient unpkg problem, so I'm going to close it. The backwards incompatibility this is covered by #14763 so let's track it there.

@bvaughn bvaughn closed this as completed Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

4 participants
@bvaughn @gaearon @j055 and others