-
Notifications
You must be signed in to change notification settings - Fork 51
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 #104
Comments
Could you provide a concise way to repro the issue? I am not really sure what we're looking at here. |
I'm updating the angular version from 17.0.4 to 18.1.1 with node version of 20.16.0 This is the package.json I've using. At the time of compiling the project, it throws error.
|
Thanks for the info, but I'm still not sure how to go about reproducing your issue. How about switching from CommonJS to the ES module? |
\Desktop\n6 - Copy\app\node_modules\listr2\node_modules\colorette\index.cjs:49 RangeError: Maximum call stack size exceeded Node.js v20.17.0 I am facing this issue while running ng serve or npm start after upgrading the version 12>13>14>15>16>17 this is my package.json |
Could you help me repro the issue? The error log from your project (which I'm not familiar with...) isn't really very helpful. Any tips on how to recreate the problem would be great. |
I recently updated my Angular project through several major versions, starting from Angular 12 up to Angular 18. After each version update, I ran npm install, but I'm encountering an error when trying to run ng serve. I have already deleted the node_modules directory and package-lock.json, and then reinstalled the node packages. Additionally, I updated the colorette package and attempted various commands, but the issue persists. I’m not sure if this issue occurs with a new project, but after updating my existing Angular project incrementally from version 12 to 18, I encounter the same error with each version update. The error appears consistently after the upgrade process, despite following the appropriate update steps. I have some screenshots of the error, which I can provide for further context.Uploading .docx… |
Could you share which Node version you're using? And is it possible for you to upgrade to a more recent version? |
I am using the latest one v20.17.0 |
Thanks. From the log, it seems your project or another dependency is trying to require the CommonJS version of the module, when it should be using import instead. I'm also wondering if this might be related to Windows, since you and the other user seem to be using it. Could be just a fluke, though. |
See the documents please let me know what to do. |
I’ve observed some behavior with the colorette package. When I specify version 1.4.0 in my package.json, the error does not appear in node_modules/colorette. However, it seems that within the dependency tree, such as in node_modules/listr2/node_modules/colorette/index.cjs, the version of colorette is automatically downgraded. as 2.0.10. This version is creating issue . but The version of coloratte is not editable in automatically downgraded libarary. |
any update or please let'us know any alternate if exists. |
Could you provide a minimal, simple/concise way to repro your issue? I can't debug this otherwise. |
I had the same issue. I'm not really sure what the root cause of the issue is, but I noticed that colorette was used by many dependencies in our app, so I tested adding
to package.json and that resolved the issue for us. So maybe different versions was being installed by some of the dependencies or something? I don't know, but it worked, so I didn't put anymore thought into it :) |
Thank you for sharing. That's a simple and elegant solution to the issue. |
Hello, I have the same issue in my project and I am using the newest version available (2.0.20). The problem is the recursion of the method Search the the input string So I tried two methods, which solved my problem:
I think the second solution is better as it reduces the number of I tried to implement it but I cannot figure out how the tests are supposed to work. So I hope, that my suggestions can make it into an update. Best regards |
To run the tests you just do |
When I run
|
What Node version are you using? |
20.9.0 |
Will give it ago, thanks. |
Thank you, although I have to update my solutions. I fixed the stackoverflow which worked for me but my solutions are false. I will update my comment |
I encountered this error because I didn’t resolve the issues from the previous Angular version before upgrading. I was simply upgrading without addressing the existing errors. It’s important to fully resolve any issues in the current version before proceeding to the next upgrade; this way, errors like this won’t occur.Resolve any errors in each upgraded version and run your project. Once the project runs successfully, you can proceed to the next version upgrade. This will definitely work . I think there is no issue in colorette. |
I still can't reproduce the issue here, and the comments in this thread seem mixed. |
This is a way to reproduce the error (I used the
I still do not understand why the error occurs running |
Thanks for the snippet. Just to clarify, did you resolve the issue based on the comments above? |
Yes, both 'work'. They do not result in the stack error. But I can not guarantee correct functionality for other use cases |
Good to know, thanks! |
This package throws maximum call stack size exceeds. It is used in my application through indirect dependency.
The text was updated successfully, but these errors were encountered: