Many projects on Github assume a user will setup a project using the require function but I'm receiving a reference error in regards to it being undefined.
What am I missing? What prerequisites are required for me to use require?
This is the project I'm attempting to set up - github.com/ngokevin/kframe/tree/master/components…
Candis W
Front-End Developer, Free Code Camp student and aspiring Full Stack Developer
Typically, require() means that you're 'requiring' something that you want to use in your project. You'll usually set it to a variable (var) or constant (const), then use that variable or constant to call whatever it is that you're requiring. Like in Node.js, there are different modules that you set to a require(). Then I'll use the 'http' module or 'tcp'/'net' module, for example, to build a small server.
Here's an example of how to use require(), based on the link you posted:
var aframe = require('aframe'); var aframeComponent = require('aframe-event-set-component');Hopefully this helps.....I'm sure you'll get other responses from others that probably know more than I do :)