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

Inconsistent compiler error #2045

Closed
amyipdev opened this issue Jul 22, 2023 · 8 comments
Closed

Inconsistent compiler error #2045

amyipdev opened this issue Jul 22, 2023 · 8 comments

Comments

@amyipdev
Copy link

About ~15% of the time, the Sass compiler crashes with the following error:

sass scss/custom.scss:assets/css/custom_bootstrap.css 
TypeError: String can't be coerced into Integer
  Use --trace for backtrace.

The other ~85%, it works just fine. Not sure what could be causing this, it's honestly very random.

@nex3
Copy link
Contributor

nex3 commented Jul 27, 2023

That does look like a bug, but it's not something I can do anything about without more information. What gets printed if you pass --trace? Can you provide a minimal project that reproduces this error?

@amyipdev
Copy link
Author

i could try and get it replicated, probably just gonna have to spam make.

this happened when working on https://github.com/amyipdev/ssvp

@amyipdev
Copy link
Author

tried about 50 times, not getting reproduction now...

@amyipdev
Copy link
Author

amyipdev commented Aug 4, 2023

@nex3

/usr/share/gems/gems/sass-3.7.4/lib/sass/script/value/number.rb:409:in `-': nil can't be coerced into Integer (TypeError)

      (num1 - num2).abs < epsilon
              ^^^^
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/value/number.rb:409:in `basically_equal?'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/value/number.rb:403:in `basically_equal?'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/value/number.rb:226:in `eql?'
        from /usr/share/ruby/set.rb:404:in `include?'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/map_literal.rb:54:in `block in _perform'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/map_literal.rb:52:in `map'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/map_literal.rb:52:in `_perform'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/node.rb:50:in `perform'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/map_literal.rb:53:in `block in _perform'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/map_literal.rb:52:in `map'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/map_literal.rb:52:in `_perform'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/node.rb:50:in `perform'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/map_literal.rb:53:in `block in _perform'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/map_literal.rb:52:in `map'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/map_literal.rb:52:in `_perform'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/node.rb:50:in `perform'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/funcall.rb:182:in `perform_arg'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/funcall.rb:129:in `block in _perform'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/funcall.rb:129:in `each'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/funcall.rb:129:in `each_with_index'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/funcall.rb:129:in `each'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/funcall.rb:129:in `map'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/funcall.rb:129:in `_perform'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/script/tree/node.rb:50:in `perform'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:478:in `visit_variable'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:36:in `visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:79:in `block in with_base'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:135:in `with_frame'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:79:in `with_base'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:158:in `visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:325:in `block (2 levels) in visit_import'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:325:in `map'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:325:in `block in visit_import'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:88:in `block in with_import'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:135:in `with_frame'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:88:in `with_import'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:322:in `visit_import'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:36:in `visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:79:in `block in with_base'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:135:in `with_frame'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:79:in `with_base'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:158:in `visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:325:in `block (2 levels) in visit_import'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:325:in `map'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:325:in `block in visit_import'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:88:in `block in with_import'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:135:in `with_frame'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:88:in `with_import'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:322:in `visit_import'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:36:in `visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:79:in `block in with_base'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:135:in `with_frame'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/stack.rb:79:in `with_base'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:158:in `visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:52:in `map'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:52:in `visit_children'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:166:in `visit_children'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:36:in `block in visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:186:in `visit_root'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:36:in `visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:157:in `visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:10:in `visit'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/root_node.rb:36:in `css_tree'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/tree/root_node.rb:29:in `render_with_sourcemap'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/engine.rb:389:in `_render_with_sourcemap'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/engine.rb:307:in `render_with_sourcemap'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/exec/sass_scss.rb:387:in `run'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/exec/sass_scss.rb:63:in `process_result'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/exec/base.rb:50:in `parse'
        from /usr/share/gems/gems/sass-3.7.4/lib/sass/exec/base.rb:18:in `parse!'
        from /usr/share/gems/gems/sass-3.7.4/bin/sass:13:in `<top (required)>'
        from /usr/bin/sass:25:in `load'
        from /usr/bin/sass:25:in `<main>'

@ntkme
Copy link
Contributor

ntkme commented Aug 4, 2023

You must have multiple installation of different versions of sass and depends on the order in $PATH it was using different sass binary. E.g. The error you posted is from the now obsolete original ruby-sass, not the dart sass.

@amyipdev
Copy link
Author

amyipdev commented Aug 4, 2023

I don't have different Sass installations, although I guess I just got the Ruby one.

Is the Dart one in the Fedora repositories? All I could find was the Ruby one, and using dnf's cnf implementation with sass returns the Ruby one.

@ntkme
Copy link
Contributor

ntkme commented Aug 4, 2023

We don't manage how fedora re-distribute ruby-sass or dart-sass. Since you are already using npm to install dependency, the easiest way would be just install the npm sass package, and then change the command in your makefile from sass to npx sass.

@amyipdev
Copy link
Author

amyipdev commented Aug 5, 2023

alright, thanks

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

3 participants