Nick Shanin created SOLR-18593:
----------------------------------
Summary: JS client build fails when NODE_ENV=production: npm
install omits the devDependencies the build needs
Key: SOLR-18593
URL: https://issues.apache.org/jira/browse/SOLR-18593
Project: Solr
Issue Type: Bug
Reporter: Nick Shanin
With {{NODE_ENV=production}} set in the environment,
{{:solr:webapp:js-client:jsClientBuild}} fails: {{npm install}} omits
devDependencies in that mode, and the generated {{package.json}} lists the
Babel plugins the build needs (for example
{{@babel/plugin-syntax-dynamic-import}}) as devDependencies, so they never
reach {{node_modules}}. The install line is {{args.set(listOf("install"))}} in
{{solr/webapp/js-client/build.gradle.kts}}; it came in with {{5b87c74fefe}} (PR
#4603), which had no Jira ticket, and the same line is in the 10.1.0 RC3 tree.
Seen in an RC3 smoke run, where the integration step failed at
{{jsClientDownloadDeps}}, and reproduced in a scratch directory with the same
{{package.json}}: {{npm install}} under {{NODE_ENV=production}} does not
install the plugin; {{npm install --include=dev}} does.
Fix prepared: add {{--include=dev}} to the install arguments so the build does
not depend on {{NODE_ENV}}. Commit {{23053d08816}} on
[emlink-copy-fallback|https://github.com/nick-boss-tech/solr/tree/emlink-copy-fallback].
Verified: {{jsClientBuild}} under {{NODE_ENV=production}} succeeds with the
plugin present, and the following smoke run passed the JS step.
🤖 _AI text above_ 🤖 _(reviewed by Nick Shanin)_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]