I installed fancybox via NPM these ways:
npm i -D @fancyapps/ui
npm i -D @fancyapps/fancybox
and I now see fancybox in my devDependencies of my package.json:
"devDependencies": {
"@fancyapps/fancybox": "^3.5.7",
"@fancyapps/ui": "^4.0.31",
"jquery": "^3.6.0",....
},
however when I have this in my .js file:
console.log(Fancybox);
the console says:
Uncaught ReferenceError: Fancybox is not defined
How can I correctly install fancybox via NPM?