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

Uncaught TypeError: Cannot read property 'local' of undefined ? #602

Closed
felixchan opened this issue Jan 30, 2012 · 15 comments
Closed

Uncaught TypeError: Cannot read property 'local' of undefined ? #602

felixchan opened this issue Jan 30, 2012 · 15 comments

Comments

@felixchan
Copy link

I just upgraded to 1.2.1 from 1.1.5, and suddenly I get this error?

loadStyleSheets(function (e, root, _, sheet, env) {
        if (env.local) {
            log("loading " + sheet.href + " from cache.");
        } else {
            log("parsed " + sheet.href + " successfully.");
            createCSS(root.toCSS(), sheet, env.lastModified);
        }
        log("css for " + sheet.href + " generated in " + (new(Date) - endTime) + 'ms');
        (env.remaining === 0) && log("css generated in " + (new(Date) - startTime) + 'ms');
        endTime = new(Date);
    }, reload);

line 3019 to be exact :)

@treshugart
Copy link
Contributor

I can confirm this. Only got it in IE, though, and can't confirm other browsers until I do further testing.

@treshugart
Copy link
Contributor

So not happening in FF 3.6.7 (and up probably) or Chrome 16.

@treshugart
Copy link
Contributor

Error seems to be happening on line 3083 where the arguments passed are different than that of the same call on line 3095. I've modified the call on 3083 and it seems to be working in IE now. I'll submit a pull request.

@treshugart
Copy link
Contributor

#604

@gavinballard
Copy link

I ran into this issue also (Chrome 16.0.912.77 on Lion).

treshugart's patch works for me.

gavinballard pushed a commit to gavinballard/less.js that referenced this issue Feb 1, 2012
@yoavre
Copy link

yoavre commented Feb 21, 2012

I get the "Uncaught TypeError: Cannot read property 'local' of undefined" as above and need the fix. Sorry but I don't understand how to get the fix above for 1.2.1
Thanks,
Yoav

@treshugart
Copy link
Contributor

I patched the pre-built source so it would have to be manually placed in your source file if it hasn't been built into a release yet (I'm not looking at the GitHub page at the moment so I'm assuming it hasn't been released yet).

Trey

On 21/02/2012, at 8:18 PM, yoavrereply@reply.github.com wrote:

I get the "Uncaught TypeError: Cannot read property 'local' of undefined" as above and need the fix. Sorry but I don't understand how to get the fix above for 1.2.1
Thanks,
Yoav


Reply to this email directly or view it on GitHub:
#602 (comment)

@gavinballard
Copy link

@yoavre @treshugart - version 1.2.2 has been released and includes treshugart's fix.

@treshugart
Copy link
Contributor

Awesome. Thanks, Gavin. Haven't looked at the status of the issue for awhile.

Trey

On 21/02/2012, at 9:44 PM, Gavin Ballardreply@reply.github.com wrote:

@yoavre @treshugart - version 1.2.2 has been released and includes treshugart's fix.


Reply to this email directly or view it on GitHub:
#602 (comment)

@yoavre
Copy link

yoavre commented Feb 21, 2012

@gavinballard - thanks. where can i simply get the less 1.2.2 javascript from? the download section in github is empty. the http://lesscss.org/ has only 1.2.1.

@treshugart
Copy link
Contributor

Check the dist/ folder in the main source directory. There's a dev and production version for 1.2.2.

Trey

On 21/02/2012, at 10:00 PM, yoavrereply@reply.github.com wrote:

@gavinballard - thanks. where can i simply get the less 1.2.2 javascript from? the download section in github is empty. the http://lesscss.org/ has only 1.2.1.


Reply to this email directly or view it on GitHub:
#602 (comment)

@yoavre
Copy link

yoavre commented Feb 21, 2012

@treshugart , @gavinballard - i managed to download it and it solved my problem. You Rock!!!

@realinit
Copy link

Please check your style-loader...

@matthew-dean
Copy link
Member

matthew-dean commented May 29, 2020

@realinit ? This is an issue from 2012. Less.js does not maintain style-loader.

@realinit
Copy link

@realinit ? This is an issue from 2012. Less.js does not maintain style-loader.
But I got this error today when I was working over a NextJs project .

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

7 participants