INNER CODE UNIT · JavaScript
checkDependencies
jofpin/temcrypt · temcrypt.js:66
function checkDependencies(dependency) {
try {
require("child_process").execSync(`npm -v`);
} catch (error) {
console.error("npm is not installed. You must install it before running this script.");
throw error;
}
try {
console.log("\n")
console.log("TEMCRYPT: SELF INSTALLATION OF DEPENDENCIES");
console.log("----------------");
console.log(`> Installing TEM dependencies: ${dependency}...`);
console.log("--");
require("child_process").execSync(`npm install ${dependency}`);
console.log(`> ${dependency} installed.`);
console.log("----------------");
console.log("| Now you can successfully use TEM!");