Are there any other dependencies I need to add to get citation-js working on a WIX site?

23 views Asked by At

I'm new to WIX websites and JavaScript in general. Anytime I put the following line at the top of my code though, my site stops working completely:

import _ from 'citation-js';

That's it- all it takes is the import statement and everything breaks. I installed citation-js npm package (v.0.7.8) to the site, and I even tried manually adding all the 11 dependencies that were listed here: https://www.npmjs.com/package/citation-js?activeTab=dependencies

I'm not sure how to get it to work- ChatGPT couldn't help me figure this one out either. I did notice something suspicious in my browser's JavaScript console, but I have no idea what to make of it.

Cannot find module 'buffer/' in '/dynamic-modules/yarn-cache/cache/sync-fetch-npm-0.4.5-b4c717cfd4-8c0.zip/node_modules/sync-fetch'

If anyone has managed to get citation-js to work on a WIX website before, please help!

I tried adding the citation-js npm package to my website, and I tried manually adding the dependencies, thinking maybe they weren't be pulled in automatically for some reason. However, no matter what packages I add I can't seem to get citation-js to work with my WIX site.

0

There are 0 answers