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

RangeError: Maximum call stack size exceeded #9586

Closed
flipps-dev opened this issue Jan 27, 2018 · 26 comments
Closed

RangeError: Maximum call stack size exceeded #9586

flipps-dev opened this issue Jan 27, 2018 · 26 comments
Assignees

Comments

@flipps-dev
Copy link

flipps-dev commented Jan 27, 2018

Hello everyone, I'm struggling with this error. After the meteor installation on windows 10 I wanted to try if it worked, but when I type in the terminal meteor --version I get this error:

C:\Users\Users\AppData\Local\.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\tools\fs\files.js:59 var useParsedSourceMap = function (pathForSourceMap) { ^ RangeError: Maximum call stack size exceeded

I thought the issue is in the file.js, but I don't know how I can fix it.

@abernix
Copy link
Contributor

abernix commented Jan 30, 2018

Please see #7896 (comment), which I believe is a duplicate of this issue. Other developers have reported success by moving other (higher up in the directory structure) node_modules out of the way.

If you could go through the same steps of moving other node_modules directories out of the way, but saving them, I'd certainly be interested in knowing exactly which turned out to be the offender. Perhaps it's the case that we need to change the meteor-tool itself (not for apps) to not use the same default module resolution paths. Though the fact that this is happening still leads me to believe that something else is slightly awry. Unfortunately, I haven't been able to put my finger on it yet (or reproduce it myself).

@flipps-dev
Copy link
Author

A question,does it have to be a meteor folder inside %AppData%\Roaming\npm\node_module?

@abernix
Copy link
Contributor

abernix commented Jan 30, 2018

No, however that could be a problematic directory so I'd recommend temporarily renaming it to anything besides node_modules temporarily in order to eliminate it as a possibility. Additionally, any of the directories listed in the output of meteor node -p "modules.paths", when run from your app directory, could be a problem. The full plan for resolving modules, is quite complicated, but hopefully you'll find something quickly in the places I've suggested.

@flipps-dev
Copy link
Author

It works yeah! I had another node_modules folder at C:\Users\UserName\node_modules I renamed this one to node_modules_old and created another one named node_modules. Maybe this last step is not important, maybe i had just renamed the old node_modules folder, without ctreate a new one, But now meteor works! Thank you!

@abernix
Copy link
Contributor

abernix commented Jan 30, 2018

Can you give me some idea of what was inside that node_modules directory (now node_modules_old)? If possible, a ZIP-file of its contents might be helpful in developing a fix for it! This isn't the first time this has affected a developer, and it's likely worth investigating a better solution.

@flipps-dev
Copy link
Author

Of course, how can I reach you out?

@abernix
Copy link
Contributor

abernix commented Jan 30, 2018

If you think it could contain sensitive information (it shouldn't), you can private message me on the Meteor forums. I'm also abernix on there.

Perhaps a link to the ZIP on a Dropbox-like service?

@flipps-dev
Copy link
Author

node_modules_old.zip

@abernix
Copy link
Contributor

abernix commented Jan 30, 2018

I can't be sure I'll get to this right away (esp. as it'll likely wait until I'm on Windows again) but thank you for providing that artifact. It could be very helpful to resolving this issue!

@abernix abernix changed the title Vers. 1.6 RangeError: Maximum call stack size exceeded RangeError: Maximum call stack size exceeded Jan 31, 2018
@abernix abernix self-assigned this Jan 31, 2018
@juho
Copy link
Contributor

juho commented Feb 23, 2018

FWIW we encounter this when deploying on Linux, solved with the environment variable

export NODE_OPTIONS=--max_old_space_size=4096

There's some discussion about it on the forums here: https://forums.meteor.com/t/how-to-increase-decrease-node-js-memory-limits-using-meteor/34355

@hwillson
Copy link
Contributor

hwillson commented Mar 5, 2018

Since this issue was resolved in #9586 (comment) (and can also be addressed by increasing max_old_space_size as mentioned in #9586 (comment)), I'll close it for now. If for some reason this issue becomes more popular, we'll definitely re-open and investigate further. Thanks!

@hwillson hwillson closed this as completed Mar 5, 2018
@yehudahkay
Copy link

Hi I'm having this issue as well, can't really use meteor, I tried installing on windows 10 and get

C:\node_modules\source-map-support\source-map-support.js:51
return function(arg) {
^

RangeError: Maximum call stack size exceeded

I have also npm installed previously but changing the name of node_modules didn't help

@yehudahkay
Copy link

I changed the name of C:\node_modules and it worked, but is very slow compared to a mac i tested it on. I tried installing on windows subsystem for linux but it is even slower. I use other packages on windows like git, npm, exp and ionic and they all work in git bash i don't need to open a windows cmd, and they also never had any conflicts. If meteor could work automatically in that fashion it would be great.

@simhadri-g
Copy link

Hi there, was having the same issue changing the name of c:\user\userName\node_modules to something else solved my problem.
Thanks.

@durjoy28
Copy link

I just installed meteor 1.8 in my win.10 pc by using choco but when I'm going to open a new project it's throw error;
^

RangeError: Maximum call stack size exceeded
why the error is generated?

@durjoy28
Copy link

screenshot 41

@yehudahkay
Copy link

@durjoy28 try the solutions we posted, but if you have a mac i found meteor was designed more for mac...

@durjoy28
Copy link

@yehudahkay I've no mac but right now I need the meteor. I tried by changing node modules name but it not working. Please let me know what should I do?

@yehudahkay
Copy link

Im sorry I cant help any more, you can actually run a mac virtual machine on windows also. Search for the issue there are a lot of recommended solutions.

@durjoy28
Copy link

My problem is solved. Just, I changed my another node_modules folder C:\Users\Durjoy\node_modules_old previously it was C:\Users\Durjoy\node_modules. I shared for others as if they can solve easily when they will face the same problem.

@nja12
Copy link

nja12 commented Jan 9, 2019

This solution worked for me too, thanks all.

@preyasha2810
Copy link

@durjoy28 hello! have u solved the error???
image

@durjoy28
Copy link

durjoy28 commented Feb 27, 2019 via email

@edemaine
Copy link
Contributor

edemaine commented Dec 9, 2021

I just ran into this issue, unaware that I'd accidentally made a C:\Users\myusername\node_modules folder, and surprised that that stopped meteor from successfully running (in a different directory, C:\Users\myusername\Projects\myprojectname). The fix works, but presumably there's an underlying issue that causes this to happen? Can we fix it, instead of everyone needing to find this thread and delete/rename that folder?

@zodern
Copy link
Member

zodern commented Dec 9, 2021

There is an open issue for the cause: #10930 (comment). It should be fixed once #11740 is merged and the Windows build machine is updated to publish the meteor-tool with working symlinks.

@LizhenQiao
Copy link

LizhenQiao commented Dec 26, 2021

I just ran into this issue, unaware that I'd accidentally made a C:\Users\myusername\node_modules folder, and surprised that that stopped meteor from successfully running (in a different directory, C:\Users\myusername\Projects\myprojectname). The fix works, but presumably there's an underlying issue that causes this to happen? Can we fix it, instead of everyone needing to find this thread and delete/rename that folder?

Vote for the idea. I was new to a meteor project and run into this issue. Though it is simple to change the folder name. It still took me several hours to find this solution. And to be honest, I believe it will prevent a great number of users who have the interest to get involved in meteor project. BTW, the solution itself seems uncomfortable. It is not the best idea for me to change the default folder name. (

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

No branches or pull requests