Files
termux-packages/packages/nodejs-lts/deps-npm-lib-commands-install.js.patch
termux-pacman-bot 04edb498c3 chore(main/nodejs-lts): pick up changes for how we configure from nodejs
Although --debug is not needed currently for nodejs-lts, let's pick it
up before it is actually needed. Also would make things much more
standard between the two packages
2025-12-10 10:42:59 +00:00

22 lines
853 B
Diff

--- ./deps/npm/lib/commands/install.js.orig 2023-01-06 02:53:25.000000000 +0530
+++ ./deps/npm/lib/commands/install.js 2023-01-17 18:45:53.985551449 +0530
@@ -119,6 +119,18 @@
throw e
}
}
+ try {
+ if (forced) {
+ log.warn(
+ 'install',
+ `Force installing npm version unpatched version of ${npmManifest.version}. This is very likely to break installation of global packages using npm. See https://github.com/termux/termux-packages/issues/13293`
+ )
+ } else {
+ throw new Error("Can't install npm globally as it will very likely break installation of global packages using npm. See https://github.com/termux/termux-packages/issues/13293")
+ }
+ } catch(e) {
+ throw e
+ }
}
// don't try to install the prefix into itself