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

Circular Dependency Issue #1629

Closed
scrossan-crown opened this issue Jun 27, 2018 · 8 comments
Closed

Circular Dependency Issue #1629

scrossan-crown opened this issue Jun 27, 2018 · 8 comments
Labels
🐛 Bug HMR Hot Module Reloading

Comments

@scrossan-crown
Copy link

🐛 bug report

The issue I am having is when there are circular dependencies in my app and I am using npx parcel index.html command to run a dev server. The file is executed multiple times untill the maximum call stack size is exceeded.

{
  "presets": ["env", "react"],
  "plugins": [
    ["transform-runtime", {
      "polyfill": false,
      "regenerator": true
    }]
  ]
}

🤔 Expected Behavior

Parcel rebuilds the javascript and the file is only executed once

😯 Current Behavior

The file is executed multiple times untill the maximum call stack size is exceeded.

image

🔦 Context

I am having to change the file structure of my app to avoid this issue

🌍 Your Environment

Software Version(s)
Parcel 1.9.0
Node 10.0.0
npm/Yarn 6.1.0
Operating System Debian GNU/Linux 9 (stretch)
@DeMoorJasper DeMoorJasper changed the title Circluar Dependency Issue Circular Dependency Issue Jun 27, 2018
@DeMoorJasper
Copy link
Member

I think this bug has already been reported, but it's definitely something that needs to be fixed.

I'll leave this open as I'm not sure if this is a duplicate.

@scrossan-crown
Copy link
Author

Is there any idea on a time frame or is there a work around to not hot reload certain files and then on page refresh it would reload the file?

@lili21
Copy link
Contributor

lili21 commented Aug 22, 2018

ran into this today. same issue.

@brookback
Copy link

I've got the same with Parcel 1.10.3 and with Typescript (external compile).

  1. Run tsc -w
  2. Run parcel index.html
  3. Save .ts file in editor
  4. Get error
build.06da9ca9.js:54 Uncaught RangeError: Maximum call stack size exceeded
    at localRequire (build.06da9ca9.js:54)
    at Object.parcelRequire.build/view/Header.js.react (Header.tsx:1)
    at newRequire (build.06da9ca9.js:49)
    at hmrAccept (index.tsx:7)
    at index.tsx:7
    at Array.some (<anonymous>)
    at hmrAccept (index.tsx:7)
    at index.tsx:7
    at Array.some (<anonymous>)
    at hmrAccept (index.tsx:7)

@droooney
Copy link

Yep, same here. Circular dependency along with hot reload causes this issue.

@wjustice
Copy link

wjustice commented Nov 2, 2018

Having the same issue.

@emadabdulrahim
Copy link

Having the same issue here. Is there any workaround for now?

@mischnic
Copy link
Member

Duplicate of #1192

@mischnic mischnic marked this as a duplicate of #1192 Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug HMR Hot Module Reloading
Projects
None yet
Development

No branches or pull requests

9 participants