Require Help!
arifjamal070 opened this issue · comments
I am just trying to the tutorial code that create the Elvis data, and I keep getting "Uncaught ReferenceError: require is not defined" for the require part of code, any advice on how to fix this?
@arifjamal070 you are probably trying to run the code on a browser. For this you need browserify (or an equivalent bundler like parcel or webpack).
If you plan to run this on a browser quickly just take the contents of src/spotify-web-api.js
.
Great that helped, but now I am getting "Uncaught ReferenceError: SpotifyWebApi is not defined" in my console. i ran through the browserify tutorial and added my bundle as a scirpt tag in my html file.
"var spotifyApi = new SpotifyWebApi();" This is the line that is giving me an error