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 size exceeded (from candidatePermutations in generateRules.js) #154

Closed
frading opened this issue Mar 9, 2022 · 2 comments

Comments

@frading
Copy link

frading commented Mar 9, 2022

Hello,

I am integrating tailwindcss-rails into a rails 6 app, and am getting the following error:

> bin/rails tailwindcss:install
W, [2022-03-09T10:41:22.420190 #2029393]  WARN -- Skylight: [SKYLIGHT] [5.1.1] Running Skylight in development mode. No data will be reported until you deploy your app.
(To disable this message for all local apps, run `skylight disable_dev_warning`.)
Default application.html.erb is missing!
        Add <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %> within the <head> tag in your custom layout.
Build into app/assets/builds
       exist  app/assets/builds
   identical  app/assets/builds/.keep
File unchanged! The supplied flag value not found!  app/assets/config/manifest.js
File unchanged! The supplied flag value not found!  .gitignore
File unchanged! The supplied flag value not found!  Procfile.dev
Add bin/dev to start foreman
   identical  bin/dev
Compile initial Tailwind build
         run  rails tailwindcss:build from "."
+ /home/gui/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/tailwindcss-rails-2.0.7-x86_64-linux/exe/x86_64-linux/tailwindcss -i /home/gui/work/web/polygonjs/dev/polygonjs-editor/app/assets/stylesheets/application.tailwind.css -o /home/gui/work/web/polygonjs/dev/polygonjs-editor/app/assets/builds/tailwind.css -c /home/gui/work/web/polygonjs/dev/polygonjs-editor/config/tailwind.config.js --minify
/snapshot/tailwindcss/lib/lib/generateRules.js:36
function* candidatePermutations(candidate, lastIndex = Infinity) {
                               ^

RangeError: Maximum call stack size exceeded
    at candidatePermutations (/snapshot/tailwindcss/lib/lib/generateRules.js:36:32)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/snapshot/tailwindcss/lib/lib/generateRules.js:61:12)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/snapshot/tailwindcss/lib/lib/generateRules.js:61:12)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/snapshot/tailwindcss/lib/lib/generateRules.js:61:12)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/snapshot/tailwindcss/lib/lib/generateRules.js:61:12)
    at candidatePermutations.next (<anonymous>)

I initially thought it would be because the tailwindcss executable did not include the fix from tailwindlabs/tailwindcss#7331, which was released in version 3.0.19, but then I see here #143 that it may indeed be in the executable.

Any idea of what I could do to debug this?

@frading
Copy link
Author

frading commented Mar 9, 2022

Still investigating this, I've just locally replaced the executable shipped with the gem, with the one from tailwind v3.0.23 (https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.0.23) and that seems to have fixed the issue.

@dhh
Copy link
Member

dhh commented Mar 10, 2022

Included 3.0.23 in 2.0.8 👍

@dhh dhh closed this as completed Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants