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

Maximum Call Stack Exceeded #1844

Closed
KalalauEnterprises opened this issue Dec 14, 2018 · 9 comments
Closed

Maximum Call Stack Exceeded #1844

KalalauEnterprises opened this issue Dec 14, 2018 · 9 comments

Comments

@KalalauEnterprises
Copy link

KalalauEnterprises commented Dec 14, 2018

I'm sorry to bother everyone - this may be a dumb question. I'm using Mobx in a Meteor 1.7 project without any issues.
I created a brand new Meteor 1.8 project w/React. It only has one route (react router) that works fine. I now want to add a store to begin building the UI.
I added mobx and mobx-react using npm install --save. All goes well.
But when I try to import { observable } from "mobx"; I get this Stack Exceeded error:

modules-runtime.js?hash=d3c3e5d67c95f97a60888bda7373292efad3be5e:56 Uncaught RangeError:
Maximum call stack size exceeded
    at Object.hasOwnProperty (<anonymous>)
    at strictHasOwn (modules-runtime.js?hash=d3c3e5d67c95f97a60888bda7373292efad3be5e:56)
    at getOwn (modules-runtime.js?hash=d3c3e5d67c95f97a60888bda7373292efad3be5e:216)
    at fileAppendIdPart (modules-runtime.js?hash=d3c3e5d67c95f97a60888bda7373292efad3be5e:456)
    at modules-runtime.js?hash=d3c3e5d67c95f97a60888bda7373292efad3be5e:480
    at Array.every (<anonymous>)
    at fileAppendId (modules-runtime.js?hash=d3c3e5d67c95f97a60888bda7373292efad3be5e:478)
    at fileResolve (modules-runtime.js?hash=d3c3e5d67c95f97a60888bda7373292efad3be5e:503)
    at fileResolve (modules-runtime.js?hash=d3c3e5d67c95f97a60888bda7373292efad3be5e:562)
    at fileResolve (modules-runtime.js?hash=d3c3e5d67c95f97a60888bda7373292efad3be5e:562)

I haven't even gotten to the point where I make my object observable yet.
I've looked at every issue in the system and they all have to do with issuing commands. I'm not even to that point yet! I also created bare bones projects for previous Meteor versions back to 1.7.0 and got the same issue every time.
Am I missing something stupid? Sorry in advance and thanks for any help!
Phil

@mweststrate
Copy link
Member

mweststrate commented Dec 14, 2018 via email

@dnish
Copy link

dnish commented Dec 18, 2018

Having exactly the same issue. Since the last MobX release, this error occurs. Reverting back to 5.7.0 solves the issue, so some changes in 5.8.0 cause the issue.

@houshuang
Copy link

Can confirm, it happens in packages/modules-runtime/.npm/package/node_modules/install/install.js, in this function

var hasOwn = {}.hasOwnProperty; function strictHasOwn(obj, key) { return isObject(obj) && isString(key) && hasOwn.call(obj, key); }

This somehow goes into an infinite loop. I put a console log debug statement here - it ran only once for every other package, but for mobx, it looped.

screen shot 2019-01-02 at 16 31 29

screen shot 2019-01-02 at 16 26 34

Seems to be an interaction between mobx and the Meteor build system.

For me it as also a problem at mobx 5.7, but going back to 5.0.3 fixed the issue.

I believe this is related to the adding of the browser field in 5.8 in package.json, which does not seem to be supported in the Meteor build system (meteor/meteor#6890)

@mweststrate
Copy link
Member

mweststrate commented Jan 9, 2019 via email

@claushaas
Copy link

claushaas commented Jan 9, 2019 via email

@mweststrate
Copy link
Member

mweststrate commented Jan 9, 2019 via email

@theodorDiaconu
Copy link

Also tracking this here: meteor/meteor#10409 maybe it's related to Meteor's module runtime system also so we can improve there too.

@mweststrate
Copy link
Member

@clhaas this seems to be resolved in the next version of meteor, and can already be tried in the beta: meteor/meteor#10409 (comment)

(Honestly, I have no clue at this moment whether webpack 4 or meteor was in the wrong here, so the issue could be reopened if the problem happens outside meteor as well)

@lock
Copy link

lock bot commented Jul 21, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants