Skip to content

With a circular dependency, TypeError: Cannot redefine property from the bundler #705

Closed

Description

@sompylasar

https://codesandbox.io/s/61zjk5n05k?module=%2Fsrc%2Findex.js

TypeError: Cannot redefine property: a
    at Function.defineProperty (<anonymous>)
    at evaluate (https://61zjk5n05k.codesandbox.io/src/index.js:9:8)
    at r.a (https://codesandbox.io/static/js/sandbox.37512735.js:5359:971)
    at e.value (https://codesandbox.io/static/js/sandbox.37512735.js:5418:270)
    at https://codesandbox.io/static/js/sandbox.37512735.js:5391:22872
    at Array.forEach (<anonymous>)
    at e.value (https://codesandbox.io/static/js/sandbox.37512735.js:5391:22843)
    at https://codesandbox.io/static/js/sandbox.37512735.js:3877:8157
    at t (https://codesandbox.io/static/js/common-sandbox.a360099a.js:1937:811)
    at Generator._invoke (https://codesandbox.io/static/js/common-sandbox.a360099a.js:1937:599)
    at Generator.e.(anonymous function) [as next] (https://codesandbox.io/static/js/common-sandbox.a360099a.js:1937:990)
    at n (https://codesandbox.io/static/js/common-sandbox.a360099a.js:2110:316)
    at https://codesandbox.io/static/js/common-sandbox.a360099a.js:2110:412

screen shot 2018-04-07 at 2 10 05 pm

Activity

  1. CompuIves commented on Apr 7, 2018

    @CompuIves
    Contributor
  2. sompylasar commented on Apr 8, 2018

    @sompylasar
    Author

    Yes, I expected a to be undefined, this sandbox is supposed to illustrate circular dependency issue, but stumbled upon this when I finished the code on desktop.

    I'm on mobile (Android Chrome) now, too, and this sandbox is stuck on the loading screen.
    screenshot_20180407-174246

  3. CompuIves commented on Apr 8, 2018

    @CompuIves
    Contributor

    Hm weird, this is what I'm getting:

    screen shot 2018-04-08 at 19 58 19

    The earlier redefine error is certainly possible. We do Hot Module Replacement when you make changes, so in that case a.js could already have been evaluated before b.js was created. A full refresh should still give the a is undefined error though.

  4. lbogdan commented on Mar 28, 2019

    @lbogdan
    Contributor

    Closing this, as it's expected behavior. @sompylasar Feel free to reopen if you still have issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions