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

V4: Uncaught ReferenceError #1047

Closed
ghost opened this issue Jul 29, 2016 · 22 comments
Closed

V4: Uncaught ReferenceError #1047

ghost opened this issue Jul 29, 2016 · 22 comments

Comments

@ghost
Copy link

ghost commented Jul 29, 2016

general issue => also occurs official website :
http://rosskevin.github.io/bootstrap-material-design/examples/dashboard/

2016-07-29_154742

Test Case

http://codepen.io/rosskevin/pen/eJMMVB

Summary

Execution error :

  • bootstrap-material-design.iife.min.js:1 => Uncaught ReferenceError: require is not defined

More specifically (using bootstrap-material-design.iife.js in place of bootstrap-material-design.iife.min.js )
polyfill.js:1Uncaught ReferenceError: require is not defined e @ polyfill.js:1 (anonymous function) @ polyfill.js:1 createCommonjsModule @ bootstrap-material-design.iife.js:12 (anonymous function) @ bootstrap-material-design.iife.js:94 (anonymous function) @ bootstrapMaterialDesign.js:205

  • pen.js:20 => Uncaught TypeError: $(...).bootstrapMaterialDesign is not a function

Expected result

Script is not working ...

Additional Information

This problem happens since today.

@FezVrasta FezVrasta added v3 and removed v3 labels Jul 31, 2016
@FezVrasta FezVrasta changed the title Uncaught ReferenceError V4: Uncaught ReferenceError Jul 31, 2016
@ghost
Copy link
Author

ghost commented Aug 1, 2016

Some extra information :

The problem is visible on the "Dashboard" example.
http://rosskevin.github.io/bootstrap-material-design/examples/dashboard/

Using the same template for my website, is this any "patch" I can use to resolve this issue ?

@FezVrasta
Copy link
Contributor

I think you will have to wait for #1045 and #1003 to be fixed before you can safely use the V4 branch.

Unluckily #1045 is still blocking for us until Bootstrap fixes it or we workaround the problem.

@ghost
Copy link
Author

ghost commented Aug 1, 2016

Thank you for the quick answer.
I really appreciate your work.
I just wanted to mention that it worked 5 days ago ... no way to use a "older" version of the script ?

@FezVrasta
Copy link
Contributor

FezVrasta commented Aug 1, 2016

I have tried to compile the documentation with the latest commit of v4-dev and it works without errors. May you give a try?

I'm closing it for now, feel free to open it again if you still reproduce the problem.

@ghost
Copy link
Author

ghost commented Aug 1, 2016

It works like a charm, thank you !

@FezVrasta
Copy link
Contributor

Yea! 👍

@arun472
Copy link

arun472 commented Aug 3, 2016

Right now i stuck from morning in app development I am pointing my application to <script src="https://cdn.rawgit.com/fezvrasta/bootstrap-material-design/dist/dist/bootstrap-material-design.iife.min.js"></script>

can you share link where js is working where the above issue is not produced.

@FezVrasta
Copy link
Contributor

In not sure the dist file are updated

@arun472
Copy link

arun472 commented Aug 3, 2016

can you help to to build from your source to build material-design.iife.min.js so that our development do not affect

@FezVrasta
Copy link
Contributor

FezVrasta commented Aug 3, 2016

Are you using the v3 or the v4 version? The link you provided is for the v3.

Or better, the file name is of the v4, but the URL points to the V3 branch.. Where did you get that URL?

@arun472
Copy link

arun472 commented Aug 3, 2016

we are using v4 . In v4 documentation http://rosskevin.github.io/bootstrap-material-design/getting-started/introduction/ even documentaion pages are also getting same above error.

@FezVrasta
Copy link
Contributor

Ok then it's a problem with the build we had before this PR was closed.

I don't know how @rosskevin published the v4 source on the above URL but probably we need to update it somehow.

I think it's better to not rely on the CDN until the V4 release is out and our CDN are properly configured. Download the source with any of the supported package managers and compile it by yourself.

@ghost
Copy link
Author

ghost commented Aug 3, 2016

Bootstrap Material Design - branch v4-dev - build 2016.08.03 12.07pm (Belgian Time)

https://we.tl/RQhElrl7HS

@arun472
Copy link

arun472 commented Aug 3, 2016

@llhoir thanks for sharing link

@rosskevin
Copy link
Contributor

The latest dist commit is broken based on unresolved Bootstrap sources. @FezVrasta if it builds as is I can publish again.

@FezVrasta
Copy link
Contributor

Yes right now the build is working 👍

@rosskevin
Copy link
Contributor

I ran gulp publish, the latest is up.

@FezVrasta
Copy link
Contributor

@rosskevin may you give me write access to the repo so I can update it by myself when needed?

@rosskevin
Copy link
Contributor

done, most of my setup docs are here http://rosskevin.github.io/bootstrap-material-design/getting-started/building/

@FezVrasta
Copy link
Contributor

I have also fixed the CDN URLs of this page:
http://rosskevin.github.io/bootstrap-material-design/getting-started/introduction/

@rosskevin
Copy link
Contributor

All distributables are pushed here:
https://github.com/FezVrasta/bootstrap-material-design/tree/dist

Pointing others to a gh-pages is a bad idea I think.

@rosskevin
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants