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

invalid operands for multiplication #16

Closed
mohamnag opened this issue Mar 9, 2015 · 9 comments
Closed

invalid operands for multiplication #16

mohamnag opened this issue Mar 9, 2015 · 9 comments
Assignees

Comments

@mohamnag
Copy link

mohamnag commented Mar 9, 2015

it seems that this code does not get compiled with node-sass@2.0.1
what I have done is:

> npm install node-sass -g
...
node-sass@2.0.1 install

> bower install skeleton-sass
....
bower install       skeleton-sass#2.0.4

> cd bower_components/skeleton-sass/

now running the following command:

node-sass skeleton_template.scss

will return:

{
  "status": 1,
  "file": "/Users/mohamnag/Projects/experiments/test-skscss/bower_components/skeleton-sass/skeleton/themes/sphenoid/_base.scss",
  "line": 203,
  "column": 11,
  "message": "invalid operands for multiplication",
  "code": 1
}

tracing the code shows, it has nothing with that line to do, but actually with line 205, from file bower_components/skeleton-sass/skeleton/core/_dependencies.scss which is:

@return ($px / $base) * 1#{$unit};

I have tried it on another machine with clean nodejs installation and I have the same problem, is this a bug in code? or a config problem?

@atomicpages
Copy link
Owner

This seems to be a bug with libsass. I've always built around the official gem (which never complained about this) but I'll look into it!

@atomicpages atomicpages self-assigned this Mar 9, 2015
@mohamnag
Copy link
Author

mohamnag commented Mar 9, 2015

yes somebody says it is fixed in 3.1 here: sass/libsass#152

I'm not sure which version is node-sass using now, but I wonder how do you manage to compile if thats not working.

@atomicpages
Copy link
Owner

How did you install libsass? I installed a fresh copy with homebrew brew install --HEAD libsass. Also, the fix you mentioned only is for the mod operator and doesn't account for this specific issue it seems :(

Finally, it appears as though the version of libsass that node-sass is using is from Jan 1 so it's a little behind schedule. I clone the master branch from the libsass repo into my node-sass with no avail. I'll see if I can track down the bug in libsass. For an immediate fix you can use the official sass gem to resume your work!

Here are some helpful links to the wiki:

@mohamnag
Copy link
Author

mohamnag commented Mar 9, 2015

I actually am not sure how did I install sass, I'm using it on a daily basis and I assume at some point I have installed the libsass using brew. I tried to replace the libsass with the head of repo but even that did not change anything.
I hope this can be fixed soon as I'm looking forward to using this very well modularised version of skeleton with more ease.

@atomicpages
Copy link
Owner

node-sass comes with libsass so it uses the internal version which is why you can use it right out of the box. However, the version that's currently bundled (at least at the time of this writing) is from Jan 1. I noticed this and cloned a fresh copy into the directory where node-sass is located but that didn't work.

I'll try to touch base with the libsass community and see if they can help!

Edit: I'm not sure if node-sass will detect and use a local version instead of the bundled version. I checked the code but I didn't see anything that indicating it would.

@atomicpages
Copy link
Owner

Finally submitted an issue on libsass. You can keep track of the issue here: sass/libsass#948

@mohamnag
Copy link
Author

great, will keep an eye on that issue too.

@atomicpages
Copy link
Owner

@mohamnag it's been a little while but sass/libsass#948 still hasn't been resolved. I'll try to have a work around sometime relatively soon!

@atomicpages
Copy link
Owner

@mohamnag this has been resolved in the 2.5.1 release thanks to pull #20!

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