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

Optimizing with plugin fails due to asynchronous load #33

Closed
purge opened this issue Oct 22, 2013 · 10 comments
Closed

Optimizing with plugin fails due to asynchronous load #33

purge opened this issue Oct 22, 2013 · 10 comments

Comments

@purge
Copy link

purge commented Oct 22, 2013

rjs 2.1.9 seems to be stricter about this, as such any asynchronous calls to onload will fail now. See 'build considerations' in http://requirejs.org/docs/plugins.html

@zxekak
Copy link

zxekak commented Oct 23, 2013

@purge do you mean error like Error: Loader plugin did not call the load callback in the build: require-less/less?

@purge
Copy link
Author

purge commented Oct 23, 2013

Yes, thats the one.

On Wed, Oct 23, 2013 at 9:58 AM, zxekak [email protected] wrote:

@purge https://github.com/purge do you mean error like Error: Loader
plugin did not call the load callback in the build: require-less/less?


Reply to this email directly or view it on GitHubhttps://github.com//issues/33#issuecomment-26889694
.

@guybedford
Copy link
Owner

Thanks for the help with testing. Are you sure you got that exact message though?

There were some changes in the 1.5.0 release that weren't caught in the 1.5.0-b4 release this was tested on originally.

It is now updated to work with the latest less 1.5.0 release, and this should be resolved.

@guybedford
Copy link
Owner

Argh actually this is a RequireJS 2.1.9 issue... working on it...

@guybedford
Copy link
Owner

Ok, this has been fixed now. Ready for a 0.1 release now, pending a little more testing.

@guybedford
Copy link
Owner

This should be fixed in the new 0.1.0 release. Let me know if it isn't.

@Mamuuut
Copy link

Mamuuut commented Feb 12, 2014

I get the same error message with r.js 2.1.10 with the require-less example

Tracing dependencies for: core-components
[object Object] at components/component.less, line 1
Error: Error: Loader plugin did not call the load callback in the build:
less/less:
less/less!components/component: [object Object]
Module loading did not complete for: components/component

@Mamuuut
Copy link

Mamuuut commented Feb 13, 2014

It seems that the less parser error is an object and not a string.
In order to display the error message properly, err.message should be used.

console.log(err.message + ' at ' + path.relative(baseUrl, err.filename) + ', line ' + err.line);
return load.error(new Error(err.message));

I still don't understand why I get a 'Syntax Error on line 1' error message from the parser ...

@Mamuuut
Copy link

Mamuuut commented Feb 13, 2014

OK, I just forgot to update my less npm package...
Maybe a compatibility check on less.version could help.

@guybedford
Copy link
Owner

Thanks that is great to bear in mind for issues in future. That could certainly be a good way to protect against this - I've created an issue here: #59.

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

4 participants