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
Without any further information it won't be possible for anybody to help
you. Please provide a reproduction, babel configuration if applicable, mobx
version used, etc, etc. Also note that similar issues have reported before
(Stack exceeded exceptions). Did you check them? Afaik they could all be
solved by fixing the build setup
Op vr 14 dec. 2018 om 01:03 schreef Phil Heinz notifications@github.com:
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 ()
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 ()
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.
Am I missing something stupid? Sorry in advance and thanks for any help!
Phil—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mobxjs/mobx/issues/1844, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABvGhBR44IXUzoFQ-YOUyKXZWYto7MQMks5u4urIgaJpZM4ZSptN
.
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.
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.


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 (https://github.com/meteor/meteor/issues/6890)
Same mobx version, also meteor?
Op wo 9 jan. 2019 01:21 schreef Claus Haas notifications@github.com:
Also have the same issue
—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
https://github.com/mobxjs/mobx/issues/1844#issuecomment-452511979, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABvGhCZ4q89oHhVMEC0iAFv8sqBU4UmFks5vBTYTgaJpZM4ZSptN
.
Yes, Michel, Meteor 1.8.0.2 and Mobx 5.8.0
Em 9 de jan de 2019, Ã (s) 05:28, Michel Weststrate notifications@github.com escreveu:
Same mobx version, also meteor?
Op wo 9 jan. 2019 01:21 schreef Claus Haas notifications@github.com:
Also have the same issue
—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
https://github.com/mobxjs/mobx/issues/1844#issuecomment-452511979, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABvGhCZ4q89oHhVMEC0iAFv8sqBU4UmFks5vBTYTgaJpZM4ZSptN
.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/mobxjs/mobx/issues/1844#issuecomment-452598269, or mute the thread https://github.com/notifications/unsubscribe-auth/AWN0zFsWKmtzRfWY6FTcZ1v3hJMz87zZks5vBZoTgaJpZM4ZSptN.
Ok, will revert early next week. Until then, stick to 4/5.7.0
Op wo 9 jan. 2019 om 11:18 schreef Claus Haas notifications@github.com:
Yes, Michel, Meteor 1.8.0.2 and Mobx 5.8.0
Em 9 de jan de 2019, Ã (s) 05:28, Michel Weststrate <
[email protected]> escreveu:Same mobx version, also meteor?
Op wo 9 jan. 2019 01:21 schreef Claus Haas notifications@github.com:
Also have the same issue
—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
https://github.com/mobxjs/mobx/issues/1844#issuecomment-452511979,
or mute
the thread
<
https://github.com/notifications/unsubscribe-auth/ABvGhCZ4q89oHhVMEC0iAFv8sqBU4UmFks5vBTYTgaJpZM4ZSptN.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <
https://github.com/mobxjs/mobx/issues/1844#issuecomment-452598269>, or
mute the thread <
https://github.com/notifications/unsubscribe-auth/AWN0zFsWKmtzRfWY6FTcZ1v3hJMz87zZks5vBZoTgaJpZM4ZSptN
.—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
https://github.com/mobxjs/mobx/issues/1844#issuecomment-452644953, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABvGhO4EYrysuTIi4Chi8S5DzqW00CQZks5vBcIMgaJpZM4ZSptN
.
Also tracking this here: https://github.com/meteor/meteor/issues/10409 maybe it's related to Meteor's module runtime system also so we can improve there too.
@clhaas this seems to be resolved in the next version of meteor, and can already be tried in the beta: https://github.com/meteor/meteor/issues/10409#issuecomment-453169097
(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)
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.
Most helpful comment
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.