I'm trying to use the last.fm API in javascript but I can't get it working. I found this GitHub reference which I thought would be useful: https://github.com/fxb/javascript-last.fm-api
var cache = new LastFMCache();
but this ^ causes an error "ReferenceError: LastFMCache is not defined." I've tried putting the files from https://github.com/fxb/javascript-last.fm-api in the same directory as the file I'm running. I'm running it with node.js - I don't know if that would be a problem. Running the file with node.js before was not a problem though. Any idea how I can remedy this problem? I can't tell if I'm missing some code or my files are in the wrong directory. Thanks for your help!
You are using client-side JavaScript library.
If you will browse the NPM, there are plenty of Last.fm modules, the most popular is simple-lastfm
Here is the example taken from the docs: