This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 1fd668e442f91895a34bbd0d173a1e20b1078677
Author: Eric Pugh <[email protected]>
AuthorDate: Wed Oct 28 21:18:04 2026 -0400

    SOLR-18593: Install JS client devDependencies regardless of NODE_ENV (#5248)
    
    (cherry picked from commit 3db71000514e1edaa8e6ae0426fce92ca97990e3)
---
 changelog/unreleased/SOLR-18593-js-client-prod-install.yml | 14 ++++++++++++++
 solr/webapp/js-client/build.gradle.kts                     |  4 +++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/changelog/unreleased/SOLR-18593-js-client-prod-install.yml 
b/changelog/unreleased/SOLR-18593-js-client-prod-install.yml
new file mode 100644
index 00000000000..fc8b5f03e7d
--- /dev/null
+++ b/changelog/unreleased/SOLR-18593-js-client-prod-install.yml
@@ -0,0 +1,14 @@
+# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
+title:
+  The generated JS client's build (solr/webapp/js-client) now installs with 
--include=dev, so it no
+  longer fails when the builder's environment has NODE_ENV=production set - 
npm would otherwise
+  skip the devDependencies (Babel and its plugins) that the build's own 
"prepare" script needs.
+type: other
+authors:
+  - name: Eric Pugh
+    nick: epugh
+  - name: Nick Shanin
+    nick: nick-boss-tech
+links:
+  - name: SOLR-18593
+    url: https://issues.apache.org/jira/browse/SOLR-18593
diff --git a/solr/webapp/js-client/build.gradle.kts 
b/solr/webapp/js-client/build.gradle.kts
index 1ce43c25978..5f57d417003 100644
--- a/solr/webapp/js-client/build.gradle.kts
+++ b/solr/webapp/js-client/build.gradle.kts
@@ -58,7 +58,9 @@ val syncJSClientSourceCode = 
tasks.register<Sync>("syncJSClientSourceCode") {
 val jsClientDownloadDeps = tasks.register<NpmTask>("jsClientDownloadDeps") {
   dependsOn(syncJSClientSourceCode)
 
-  args.set(listOf("install"))
+  // Need to install devDependencies like Babel to support the build-time code 
generator,
+  // even though no actual dev tooling ships in Solr
+  args.set(listOf("install", "--include=dev"))
   workingDir.set(jsClientWorkspace)
 
   inputs.dir("$jsClientWorkspace/src")

Reply via email to