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

Using domReady! as a dependency argument causes an error #278

Closed
OOPMan opened this issue Aug 6, 2014 · 4 comments
Closed

Using domReady! as a dependency argument causes an error #278

OOPMan opened this issue Aug 6, 2014 · 4 comments

Comments

@OOPMan
Copy link

OOPMan commented Aug 6, 2014

I define a module like:

define(["a", "b", "domReady!"], function(a, b) {
// STUFF
});

I then use cram to compile a JS bundle.

When the bundle file is included, I get an error like:

Uncaught Error: duplicate define: curl/domReady curl.js:6
K curl.js:6
E curl.js:6
(anonymous function) 32f63851a26c486cad1611ea1b18648d.js:18095
(anonymous function) 32f63851a26c486cad1611ea1b18648d.js:18108

In this instance, I was able to remove the domReady! dependency from my module (I had placed it there on a mistaken assumption, it was not actually needed) but it does seem like this should be supported. I'm not sure if this is a curl issue or a cram issue though?

@unscriptable
Copy link
Member

Hey @OOPMan,

Are you using a compiled ("dist") version of curl.js? There are a few reasons you shouldn't do this. I'm just guessing that perhaps this is causing the problem?

-- John

@OOPMan
Copy link
Author

OOPMan commented Aug 6, 2014

Hi @unscriptable

I am indeed using a dist version of curl.js.

I shall try using a source version. I assume cram will correctly pull in all the plugins I use?

@unscriptable
Copy link
Member

Yes. cram should pull in everything you need. :)

@OOPMan
Copy link
Author

OOPMan commented Aug 6, 2014

Great, I will close this now and if for some reason the issue persists I'll re-open it :-)

@OOPMan OOPMan closed this as completed Aug 6, 2014
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