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

Moment not loaded for context #21

Closed
imrane opened this issue Jul 13, 2013 · 2 comments
Closed

Moment not loaded for context #21

imrane opened this issue Jul 13, 2013 · 2 comments

Comments

@imrane
Copy link

imrane commented Jul 13, 2013

I am getting the following requirejs error when loading this library

http://requirejs.org/docs/errors.html#notloaded

I even tried using the shim config and received the same error

shim:
  "momentrange":
    deps: ["moment"]

Anyone else running into this problem?

@SlexAxton
Copy link

What does your network panel look like? Does it have a 404 request?

Is your file at your baseUrl + /momentrange.js?

Is moment.js at baseUrl + /moment.js?

Maybe it'd help to still export moment from the shim?

A little more debug info is probably what we'd really need.

@SlexAxton
Copy link

Ah looks like @timmywil tracked it down to some require cross over:

Line 2 should probably be:

if require? and !require.amd

https://github.com/gf3/moment-range/blob/master/src/moment-range.coffee#L2

@gf3 gf3 closed this as completed in 02197e0 Jul 15, 2013
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