diff mbox series

[bug#59188,v6,01/19] build-system: node: Use `--install-links' with `npm install'.

Message ID f79706bd0c78f8cd42681c88df6e71ef1124e786.1680179491.git.jlicht@fsfe.org
State New
Headers show
Series Updating node-lts to 18.X | expand

Commit Message

Jelle Licht March 30, 2023, 12:31 p.m. UTC
From: Jelle Licht <jlicht@fsfe.org>

Later versions of npm need to explicitly install a copy of local dependencies,
instead of only a symlink.

* guix/build/node-build-system.scm (configure): Add `--install-links' to npm
install invocation.
(install): Ditto.
---

(no changes since v1)

 guix/build/node-build-system.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/guix/build/node-build-system.scm b/guix/build/node-build-system.scm
index bee3792e93..93f7efbb2b 100644
--- a/guix/build/node-build-system.scm
+++ b/guix/build/node-build-system.scm
@@ -223,7 +223,7 @@  (define* (delete-lockfiles #:key inputs #:allow-other-keys)
 
 (define* (configure #:key outputs inputs #:allow-other-keys)
   (let ((npm (string-append (assoc-ref inputs "node") "/bin/npm")))
-    (invoke npm "--offline" "--ignore-scripts" "install")
+    (invoke npm "--offline" "--ignore-scripts" "--install-links" "install")
     #t))
 
 (define* (build #:key inputs #:allow-other-keys)
@@ -262,6 +262,7 @@  (define* (install #:key outputs inputs #:allow-other-keys)
             "--offline"
             "--loglevel" "info"
             "--production"
+            "--install-links"
             "install" "../package.tgz")
     #t))