Skip to content

Conversation

@nylen
Copy link
Member

@nylen nylen commented Aug 3, 2017

Currently, Gutenberg will fail to load with the following error:

It may be necessary to rm vendor/*.js in order to see this error, because by default these vendor JS files are cached for one day.

This failure occurs because we attempt to load https://unpkg.com/react-dom@next/umd/react-dom-server.production.min.js, which currently redirects to https://unpkg.com/[email protected]/umd/react-dom-server.production.min.js, which is not found.

As seen in the directory listing at https://unpkg.com/[email protected]/umd/ and the related React change (facebook/react#10362), the correct path to this file now includes a .browser suffix.

The first commit in this PR adds error handling to detect this condition (and any other such failures) when building a plugin zip file:

$ bin/build-plugin-zip.sh 
WARNING: You should probably be running this script against the
         'master' branch (current: 'fix/build-error-react-dom-server')

https://unpkg.com/react@next/umd/react.production.min.js
 > vendor/react.min.c7397a88.js ... done!
https://unpkg.com/react-dom@next/umd/react-dom.production.min.js
 > vendor/react-dom.min.912dc6cf.js ... done!
https://unpkg.com/react-dom@next/umd/react-dom-server.production.min.js
 > vendor/react-dom-server.min.538e07c8.js ... error - HTTP 404

The second commit fixes the load issue (and the plugin zip build) by fixing the path.

@nylen
Copy link
Member Author

nylen commented Aug 3, 2017

Merging this to fix the build.

@nylen nylen merged commit 90b16ed into master Aug 3, 2017
@nylen nylen deleted the fix/build-error-react-dom-server branch August 3, 2017 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants