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 Object" error in RequireJS with NProgress 1.3; 1.2 works fine #85

Open
SebastianMetzger opened this issue Jun 18, 2014 · 4 comments

Comments

@SebastianMetzger
Copy link

There seems to be some kind of conflict between the latest NProgress and requireJS.
After including NProgress 1.3 my initial require(..:) call creates a "Uncaught Object" error.

Have not looked into it any deeper.

Downgrading to 1.2 fixed the problem.

@rstacruz
Copy link
Owner

If anyone can help debug this issue, it'd be very well appreciated.

@rstacruz
Copy link
Owner

Okay, I've edited the module loader block to use umd.js conventions. Let me know if it works for you.

4aa6518

You'll have to fetch the latest master from GitHub on this one — I'll release it if you guys can confirm that it works for you too.

@SebastianMetzger
Copy link
Author

I tried it with latest master and the initial problem was the same.

I have to say additionally, that I do not use NProgress with require.js directly.
There seems to be some global collision problem with the two libraries.

This is enough to trigger the error:

<!DOCTYPE html>
<html>
<head>
  <!-- NOT WORKING -->
  <script type="text/javascript" src="bower_components/requirejs/require.js"></script>
  <script type="text/javascript" src="js/nprogress/nprogress.js"></script>
</head>
<body>
</body>
</html>

I found out however, that simply reversing the script tag order solves this:

<!DOCTYPE html>
<html>
<head>
   <!-- WORKING -->
   <script type="text/javascript" src="js/nprogress/nprogress.js"></script>
  <script type="text/javascript" src="bower_components/requirejs/require.js"></script>
 </head>
<body>
</body>
</html>

@Dreampie
Copy link

if you include nprogress in this way,not need requirejs
I test in 0.1.3 and 0.1.6,all work not fine
but 0.1.2 work in requirejs,its ok

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