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

Cannot call method 'charAt' of undefined in sprites.less #2029

Closed
iriscoopers opened this issue Feb 17, 2012 · 23 comments
Closed

Cannot call method 'charAt' of undefined in sprites.less #2029

iriscoopers opened this issue Feb 17, 2012 · 23 comments

Comments

@iriscoopers
Copy link

Hello,

I've just downloaded the new update and I'm using less.1.2.1. Set up a simple test page using the fluid.html example but I get the Cannot call method 'charAt' of undefined in sprites.less error. (on my local server)

If I comment out @import "sprites.less"; in bootstrap.less it works fine.

The urls to the img folder are set correctly in variables.less so i'm kinda lost. Quite new to less too.
I'm compiling it on client side.

Any advice is much appreciated, thanks!

Iris

@iriscoopers
Copy link
Author

Seems like i found the answer :

in sprite.less i changed background-image: url("@{iconSpritePath}"); and background-image: url("@{iconWhiteSpritePath}");

adding the " " and the { } got rid of the errors..

@BenjiZombie
Copy link

This needs to be fixed in 2.0.2!

@srhise
Copy link

srhise commented Feb 21, 2012

I can confirm as well this fixed worked for me too!
Thank you!

@brandonhall
Copy link

+1 for this solution as well

@dannylloyd
Copy link

Worked for me too, Thanks!

@vascop
Copy link

vascop commented Feb 25, 2012

Also confirming fatalmusicgroup's solution.

@jimjkelly
Copy link

Yup, fix worked for me too.

@dperrymorrow
Copy link

me as well, thanks for the post

@indieocean
Copy link

Fixed it for me, Thanks!

@funkotron
Copy link

This does fix the issue, please update master with this change

@andrebrantom
Copy link

Worked for me too. Thanks!

@mnstefan
Copy link

mnstefan commented Mar 4, 2012

Worked also for me, thank you!!

@renoirb
Copy link

renoirb commented Mar 4, 2012

Indeed, worked for me too.

But, I had also to add it to the root (on the bootstrap.less). Because trying to get a variable ../img/ was resolving to an absolute path.

@danielmartins
Copy link

Worked for me too! Thanks!

@asmega
Copy link

asmega commented Mar 10, 2012

+1

@klu2
Copy link

klu2 commented Mar 12, 2012

I just downloaded the current 2.0.2 snapshot, the error still occurs in there.

@robflaherty
Copy link

@klu2 - Are you using LESS 1.3?

@klu2
Copy link

klu2 commented Mar 14, 2012

yes

@gagarine
Copy link

Get the same error with LESS 1.3.

I have a main css file and import bootstrap's CSSs from theirs

EDIT: Never mind is because I forget to load variable.less

@jg314
Copy link

jg314 commented Mar 20, 2012

+1. The solution worked for me as well. Thanks.

@danawoodman
Copy link

FYI: I ran into the problem while using an old version of LESS.app, make sure to update LESS.app if you're using it and coming across problems.

@remontees
Copy link

+1 in Ubuntu

@summanerd
Copy link

I commented out sprite.less and the problem persists...any solutions. I'm thinking I may just have to scrap less. It's holding up development and seems to be a common issue.

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