Uncaught TypeError: $(...).fitVids is not a function -SAGE 9

Try to install the fitvids with the latest Sage 9, but it keep giving me an error.

import {fitvids} from 'fitvids';


Uncaught TypeError: $(...).fitVids is not a function
at Object.init (common.js:46)
at Router.fire (Router.js:30)
at Router.loadEvents (Router.js:45)
at HTMLDocument.<anonymous> (main.js:38)
at i (jquery-1.12.4.min.js:2)
at Object.fireWith [as resolveWith] (jquery-1.12.4.min.js:2)
at Function.ready (jquery-1.12.4.min.js:2)
at HTMLDocument.K (jquery-1.12.4.min.js:2)



This should be sending up some red flags:

That means that JS is trying to execute a thing (who knows what it actually is) that it can’t execute. If you take a look at the source for fitVids, it looks like it doesn’t support being used as a JS module—specifically, it doesn’t export anything you can import. Instead, it just wants you to add it so it can hook in to jQuery.

My (untested) suggestion would be to do the following:

import 'jquery'
import 'fitvids'


thanks, but not working!

What else have you tried?

switch it to fluidvids.js