Skip to content

Commit 1209d90

Browse files
Hide npm preuninstall errors
Due to issue in npm versions 3.0, 3.5.1, 3.7.3 (may be more 3.x versions) the NativeScript node_modules are removed before the preuninstall script is executed and it fails. The issue is logged in the npm repository: npm/npm#8806 but it is not fixed in version 3.1.1 as commented in the discusion.
1 parent 9202b9a commit 1209d90

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/common

preuninstall.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ var child_process = require("child_process");
22

33
var child = child_process.exec("node bin/nativescript.js dev-preuninstall", function (error) {
44
if (error) {
5+
// Some npm versions (3.0, 3.5.1, 3.7.3) remove the NativeScript node_modules before the preuninstall script is executed and the script can't find them (the preuninstall script is like postinstall script).
6+
// The issue is described in the npm repository https://github.com/npm/npm/issues/8806 and it is not fixed in version 3.1.1 as commented in the conversation.
57
console.error("Failed to complete all pre-uninstall steps. ");
6-
console.log(error);
78
}
89
});
910

0 commit comments

Comments
 (0)