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

error on clipboardjs.com #177

Closed
ChrRaz opened this issue Feb 2, 2016 · 8 comments
Closed

error on clipboardjs.com #177

ChrRaz opened this issue Feb 2, 2016 · 8 comments

Comments

@ChrRaz
Copy link

ChrRaz commented Feb 2, 2016

Hi,
It seems that the demo site recently broke.
Upon page load the demos.js file and the snippets.js files throw an error claiming that "Clipboard is not a constructor".
Because of the error the rest of the script is not executed rendering the site nonfunctional.
The raw error as printed by Firefox is included below:
TypeError: Clipboard is not a constructor
var clipboardDemos = new Clipboard('[data-clipboard-demo]'); demos.js (line 1, col 26)
I have reproduced this on Firefox and Chromium on Windows and Firefox on Linux.

@ChrRaz
Copy link
Author

ChrRaz commented Feb 2, 2016

Also looking at the commit list this seems to relate to the release of the 1.5.6 release.
An entire release is not much to go from but I suspect it is a place to start. Hope it helps.
I really like the project btw. Great work!

@myoung8
Copy link

myoung8 commented Feb 2, 2016

we also had Clipboard break when using it via Ember on v1.5.6 (had to revert to 1.5.5)

Here's the error we got (Chrome 48.0.2564.97 (64-bit) on a Mac)

TypeError: Clipboard is not a function

And here's how we import it, FWIW:

app.import('bower_components/clipboard/dist/clipboard.js');

@sadiqmmm
Copy link

sadiqmmm commented Feb 3, 2016

Getting Error on Clipboard v1.5.6, working fine on v1.5.5.

In Chrome Console
Uncaught TypeError: Clipboard is not a function

In firefox console
TypeError: Clipboard is not a constructor

@dduponchel
Copy link

When debugging, I found that Clipboard is an object containing the constructor in default (I have the same issue on a web application using requirejs). I think it comes from the babel 6 migration in ee1eb45 (see that stackoverflow question).

@QuentinFchx
Copy link

👎 Please make sure a patch release does not break the whole thing...

@zenorocha
Copy link
Owner

Take it easy boys, it seems like Babel 6 broke the v1.5.6 release. I'll work on a patch asap. Keep using v1.5.5 in the meanwhile.

@zenorocha
Copy link
Owner

Just released 1.5.7. Everything should be working fine now ;)

@d-theo
Copy link

d-theo commented Mar 6, 2017

hi,
I'm having the exact same issue with systemjs-builder (which use babel-core I think), any idea how I could solve the problem ?

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

7 participants