workaround quirks from npm

This commit is contained in:
alexlamsl 2022-08-26 18:34:51 +08:00
parent cd97237c59
commit 985fa2328d
2 changed files with 6 additions and 0 deletions

View File

@ -62,6 +62,7 @@ if (typeof phantom == "undefined") {
var cmd = process.platform == "win32" ? "npm.cmd" : "npm"; var cmd = process.platform == "win32" ? "npm.cmd" : "npm";
function npm(args, done) { function npm(args, done) {
args.push("--loglevel=error");
child_process.spawn(cmd, args, { stdio: [ "ignore", 1, 2 ] }).on("exit", done); child_process.spawn(cmd, args, { stdio: [ "ignore", 1, 2 ] }).on("exit", done);
} }
@ -72,9 +73,12 @@ if (typeof phantom == "undefined") {
"is-my-json-valid@2.20.5", "is-my-json-valid@2.20.5",
"phantomjs-prebuilt@2.1.14", "phantomjs-prebuilt@2.1.14",
"--no-audit", "--no-audit",
"--no-fund",
"--no-optional", "--no-optional",
"--no-save", "--no-save",
"--no-strict-ssl",
"--no-update-notifier", "--no-update-notifier",
"--production",
], function(code) { ], function(code) {
if (code) { if (code) {
console.log("npm install failed with code", code); console.log("npm install failed with code", code);

View File

@ -48,6 +48,8 @@ done
nvs use $NODE nvs use $NODE
node --version node --version
npm config set audit false npm config set audit false
npm config set fund false
npm config set loglevel error
npm config set optional false npm config set optional false
npm config set save false npm config set save false
npm config set strict-ssl false npm config set strict-ssl false