Semantic-ui-react: Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

Created on 28 Mar 2019  路  3Comments  路  Source: Semantic-Org/Semantic-UI-React

Bug Report

Steps

Using semantic-ui-react.min.js in a script tag doesn't work, e.g. when trying to externalise the dependency in webpack and use a CDN-build instead.

<!DOCTYPE html>
<html>
    <body>
        This does't work!
        <script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.8.5/umd/react.production.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.8.5/umd/react-dom.production.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui-react/0.86.0/semantic-ui-react.min.js"></script>
    </body>
</html>

Expected Result

Semantic-ui-react.min.js is available in the webpage

Actual Result

The following error occurs in the console:

semantic-ui-react.min.js:1342 Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
    at Module.<anonymous> (semantic-ui-react.min.js:1342)
    at Module.<anonymous> (semantic-ui-react.min.js:1342)
    at n (semantic-ui-react.min.js:1)
    at semantic-ui-react.min.js:1
    at semantic-ui-react.min.js:1
    at semantic-ui-react.min.js:1
    at semantic-ui-react.min.js:1

Version

0.86.0 (doesn't work with 0.85.0 either).

Also tested with different versions of react/react-dom (16.3.0 / 16.6.0 / 16.8.5).

bug

Most helpful comment

Thanks for the report 馃憤 Fixed in #3540, next release will work as expected 馃殌 I also added a test to ensure that build works as expected

All 3 comments

馃憢 Thanks for opening your first issue here! If you're reporting a 馃悶 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

I can confirm 0.84.0 works as it should

Thanks for the report 馃憤 Fixed in #3540, next release will work as expected 馃殌 I also added a test to ensure that build works as expected

Was this page helpful?
0 / 5 - 0 ratings