INNER CODE UNIT · JavaScript

badPackageError

phusion/passenger · src/helper-scripts/node-loader.js:37

function badPackageError(packageName) {
	return "You required the " + packageName + ", which is incompatible with Passenger, a non-functional shim was returned and your app may still work. However, please remove the related code as soon as possible.";
}

// Logs failure to install shim + extended debug info, but with strict spamming protection.
function errorMockingRequire(packageName, error, args, count) {
	if (count > 2) {
		return; // spam protect against repeated warnings
	}
	var msg = "Failed to install shim to guard against the " + packageName + ". Due to: " + error.message + ". Your can safely ignore this warning if you are not using " + packageName;
	msg += "\n\tNode version: " + process.version + "\tArguments: " + args.length;
	for (i = 0; i < args.length; i++) {
		if (i > 9) { // limit the amount of array elements we log
			break;
		}
		msg += "\n\t[" + i + "] " + util.inspect(args[i]).substr(0, 200); // limit the characters per array element
	};
	console.error(msg);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…