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

Requiring with requirejs yields error on "." #1

Open
tybenz opened this issue Jun 25, 2014 · 3 comments
Open

Requiring with requirejs yields error on "." #1

tybenz opened this issue Jun 25, 2014 · 3 comments

Comments

@tybenz
Copy link

tybenz commented Jun 25, 2014

Downloaded local copy of monopost and tried to require with:

require([
    'jquery',
    'lodash',
    'postal',
    'monologue'
], function( $, _, postal, Monologue, bridge ) {
    console.log( 'foo' );
});

Getting an error:

GET https://localhost:8084/js/.js?bust=1403719876575 404 (Not Found) require.js:34
Uncaught Error: Script error for: 
    http://requirejs.org/docs/errors.html#scripterror require.js:8
Uncaught Error: Load timeout for modules: 
    http://requirejs.org/docs/errors.html#timeout require.js:8

Looks like in the define for monopost it specifies "." as a dependency. Require.js is trying to load that module. Is there something obvious I'm missing about require.js or monopost here?

@ifandelse
Copy link
Contributor

@tybenz uh oh - sorry for the troubles. I'll try and look at this tonight and get back to you ASAP.

@tybenz
Copy link
Author

tybenz commented Jun 25, 2014

It's alright. Looks like the first arg in the defined function was supposed to be lodash/underscore. changed "." to "underscore" and it's working now

@indrajeet-ambadekar
Copy link

Guys, I am facing a similar problem and i have been stuck here for hours now. Could you please help me out on this?

GET http://localhost:8000/src/scripts/lodash.js require.js:1910
Uncaught Error: Script error for: lodash require.js:166
http://requirejs.org/docs/errors.html#scripterror

my view is as follows:
define(['jquery','underscore', 'backbone', 'postal'], function($, _, Backbone, postal){
......})

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

3 participants