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

vue-sticky-directive.js:4 Uncaught TypeError: Cannot set property 'VueStickyDirective' of undefined #40

Open
aberbenni opened this issue Sep 11, 2020 · 0 comments

Comments

@aberbenni
Copy link

Importing vue-sticky-directive.js from CDN leads to:

vue-sticky-directive.js:4 Uncaught TypeError: Cannot set property 'VueStickyDirective' of undefined
    at vue-sticky-directive.js:4
    at vue-sticky-directive.js:5
(anonymous) @ vue-sticky-directive.js:4
(anonymous) @ vue-sticky-directive.js:5
Uncaught SyntaxError: The requested module 'https://cdn.jsdelivr.net/npm/[email protected]/vue-sticky-directive.js' does not provide an export named 'default'

error in browser.

Here is the code:

<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/vue-sticky-directive.js"></script>

<script type="module">    
    import Sticky from 'https://cdn.jsdelivr.net/npm/[email protected]/vue-sticky-directive.js';
    
    Vue.directive('Sticky', Sticky);
    ...
<script> 
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

1 participant