diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 1e674bd14b..a68cb9a5f7 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -41,6 +41,7 @@
 ;;; Copyright © 2024 Marco Baggio <guix@mawumag.com>
 ;;; Copyright © 2024, 2025 Spencer King <spencer.king@geneoscopy.com>
 ;;; Copyright © 2024-2025 Tor-björn Claesson <tclaesson@gmail.com>
+;;; Copyright © 2025 Daniel Khodabakhsh <d@niel.khodabakh.sh>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -6695,7 +6696,7 @@ (define-public r-waiter
                        "inst/assets/garcon/garcon.min.js"))))))
       (propagated-inputs (list r-htmltools r-r6 r-shiny))
       (native-inputs
-       (list esbuild-node node-lts r-knitr
+       (list node-esbuild node-lts r-knitr
              (origin
                (method git-fetch)
                (uri (git-reference
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 14892c4ef7..9e4dbd0e68 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -70,6 +70,7 @@
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2024, 2025 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;; Copyright © 2025 Raven Hallsby <karl@hallsby.com>
+;;; Copyright © 2025 Daniel Khodabakhsh <d@niel.khodabakh.sh>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -104,6 +105,7 @@ (define-module (gnu packages web)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system meson)
+  #:use-module (guix build-system node)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
@@ -2198,57 +2200,54 @@ (define-public websockify
 directions.")
     (license license:lgpl3)))
 
-;; This is a variant of esbuild that builds and installs the nodejs API.
-;; Eventually, this should probably be merged with the esbuild package.
-(define-public esbuild-node
-  (package
-    (inherit esbuild)
-    (name "esbuild-node")
-    (version "0.14.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/evanw/esbuild")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "09r1xy0kk6c9cpz6q0mxr4why373pwxbm439z2ihq3k1d5kk7x4w"))
-       (modules '((guix build utils)))
-       (snippet
-        ;; Remove prebuilt binaries
-        '(delete-file-recursively "lib/npm/exit0"))))
-    (arguments
-     (list
-      #:import-path "github.com/evanw/esbuild/cmd/esbuild"
-      #:unpack-path "github.com/evanw/esbuild"
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'build 'build-platform
-            (lambda* (#:key unpack-path #:allow-other-keys)
-              (with-directory-excursion (string-append "src/" unpack-path)
-                ;; Must be writable.
-                (for-each make-file-writable (find-files "." "."))
-                (invoke "node" "scripts/esbuild.js"
-                        (string-append #$output "/bin/esbuild"))
-                (let ((modules (string-append #$output "/lib/node_modules/esbuild")))
-                  (mkdir-p modules)
-                  (copy-recursively "npm/esbuild" modules)))))
-          (replace 'check
-            (lambda* (#:key tests? unpack-path #:allow-other-keys)
-              (when tests?
-                ;; The "Go Race Detector" is only supported on 64-bit
-                ;; platforms, this variable disables it.
-                ;; TODO: Causes too many rebuilds, rewrite to limit to x86_64,
-                ;; aarch64 and ppc64le.
-                #$(if (target-riscv64?)
-                      `(setenv "ESBUILD_RACE" "")
-                      #~(unless #$(target-64bit?)
-                          (setenv "ESBUILD_RACE" "")))
-                (with-directory-excursion (string-append "src/" unpack-path)
-                  (invoke "make" "test-go"))))))))
-    (native-inputs
-     (list go-github-com-kylelemons-godebug node-lts))))
+; NOTE: in web.scm because of dependency issues when using (package-* esbuild)
+(define-public node-esbuild
+  (package
+    (name "node-esbuild")
+    (version (package-version esbuild))
+    (source
+      (origin
+        (inherit (package-source esbuild))
+        (file-name (git-file-name name version))
+        (snippet #f)
+        (modules '())))
+    (build-system node-build-system)
+    (inputs (list esbuild))
+    (arguments (list
+      #:tests? #f
+      #:phases #~(modify-phases %standard-phases
+        (add-after 'unpack 'chdir (lambda _
+          (chdir "npm/esbuild")))
+        (add-before 'patch-dependencies 'modify-package (lambda _
+            (modify-json
+              (delete-fields '("optionalDependencies" "scripts")))
+            (substitute* "../../lib/npm/node-platform.ts"
+              (("^export var ESBUILD_BINARY_PATH:.+$")
+                (string-append "export var ESBUILD_BINARY_PATH: string"
+                " = process.env.ESBUILD_BINARY_PATH"
+                " || ESBUILD_BINARY_PATH"
+                " || path.join(__dirname, '..', 'bin', 'esbuild')")))))
+        (replace 'build (lambda* (#:key inputs #:allow-other-keys)
+          ; From scripts/esbuild.js
+          (invoke
+            "esbuild"
+            "../../lib/npm/node.ts"
+            "--outfile=lib/main.js"
+            "--bundle"
+            "--target=node10"
+            "--define:WASM=false"
+            (string-append "--define:ESBUILD_VERSION=\"" #$version "\"")
+            "--external:esbuild"
+            "--platform=node"
+            "--log-level=warning")
+          (copy-file "../../lib/shared/types.ts" "lib/main.d.ts")
+          (install-file
+            (string-append (assoc-ref inputs "esbuild") "/bin/esbuild")
+            "bin"))))))
+    (home-page (package-home-page esbuild))
+    (synopsis "Node module of ESBuild")
+    (description (package-description esbuild))
+    (license (package-license esbuild))))
 
 (define-public wwwoffle
   (package
