When exploring different tools, I have found at least one module (and it’s intended theme) that includes in its installation instructions to Run "npm install"
.
Having not come from a coding background, I have no idea how to do this. After some digging, I did find that Cpanel does have a “Terminal”, but it doesn’t go into a folder to do something (that I know of–its one-time warning of the possibility of corrupting data made me VERY wary of trying to use it).
After exploring a ton of code on the backend, I became curious about the composer.json
and package.json
files and after lots of Googling, I think I found something: An Introduction to Package JSON Scripts in Node.js. This article makes me think that I can add "npm run install"
in a package.json
file under "scripts": {}
.
If I combine that with the “Run … inside the folder”, do I just add a package.json
file (or add to the one that’s already there) in that folder, making sure that it at least includes
"scripts" : {
"postbuild": "npm run install"
}
? Is this right, or am I way off base?