I used to be able to find JS projects on github and just download them and use them. I’m having problems with a group of JS projects I want to check out. For each I try I get an error stating it can’t find build.js. There is no build.js within the downloaded projects.
It gives instructions on how to install with NPM below but I guess I don’t recall or quite understand how to do that. I’m also not sure if that relates to some sort of “build” process for this project.
I don’t understand why people are compiling JS projects now. Feel free to insult me if you want.
Well, I know how to just download the specific files for installation. I’m actually trying to use the examples. I unfortunately forgot to specify that. The download itself contains some examples that require a build.js which is not included.
In a sense my question is broad. How do I build this project? In order to build is, is that done through the NPM installation? Also, why?
Would it be worth just installing Node.js (it includes npm). The chances are you’ll comes across the requirement at some future point anyway, if you are looking at the kind of packages you’re describing. My experiences (on Windows) with it has been very straightforward so far, though my use has largely been for installing linters in SublimeText3.
I did. There’s obviously a lot I need to learn but I’m not going to lie, I wish it wasn’t this complicated. It drives me crazy that I have to install so many things in order to perform tasks but I understand that’s the JS scene currently. I’ll do some more reading.
Sorry, that was my bad. I originally posted it as npm run install it just needs to be npm install
It’s worth taking a little time to understand npm, it’s a very important piece of tech.
It’s actually meant to simplify things, when looking at a new project all you have to do is npm install and then you have all the dependencies needed.
I’ve used it very casually and I guess I can’t get away with that any longer. So presumably after this is all installed, this has to run on a node server?
Mine is just running on my Windows 10 laptop. There’s no suggestion that I’m running a Node server as such, though it could be what’s running in the background - I just don’t see it.
Nope, it’s just static files so you can just open the examples in your browser.
Here’s the four steps I took to get the example running.
git clone git@github.com:ngokevin/aframe-template-component.git
npm install
npm run build
open examples/basic/index.html
The first step when loading a lot of these types of projects is to look through package.json to see what scripts they contain and look at the dependencies. Projects should have Installation instructions in the readme too, but this one doesn’t have much.
Okay. Well, I better understand how to make sense of these package.jsons and work with it. I got it working. I appreciate it. I have a lot of catching up.