front / gutenberg-js

JavaScript only version of the WordPress Gutenberg editor (DEPRECATED)
GNU General Public License v2.0
390 stars 42 forks source link

Cannot read property 'createContext' of undefined #16

Closed dragonfire1119 closed 5 years ago

dragonfire1119 commented 5 years ago

I keep getting Cannot read property 'createContext' of undefined I'm following the readme but it just doesn't seem to be working. I'm also loading them in order by example: https://github.com/front/g-editor/blob/master/package.json Thanks for any help.

UPDATE: I was trying to add the dependencies without

<script src="https://unpkg.com/react@16.6.3/umd/react.production.min.js"></script>
    <script src="https://unpkg.com/react-dom@16.6.3/umd/react-dom.production.min.js"></script>
    <script src="https://unpkg.com/moment@2.22.1/min/moment.min.js"></script>

    <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>

adding these to the head but it seems like you can't.

Now the error is TypeError: Cannot read property 'indexOf' of undefined in the gutenberg.js file something to do with the apiFetch.

gutenberg-js: 3.0.1 react: 16.6.3 react-dom: 16.6.3