fix: build web UI during installation (web_dist missing from pip package)#9343
Closed
z104866 wants to merge 1 commit into
Closed
fix: build web UI during installation (web_dist missing from pip package)#9343z104866 wants to merge 1 commit into
z104866 wants to merge 1 commit into
Conversation
The install script ran 'npm install' successfully but never built the web UI, causing web_dist/ to be missing from the pip package. The pyproject.toml declares hermes_cli = ['web_dist/**/*'] as package data, but web_dist is only created by 'npm run build' in the web/ subdirectory. This change: - Adds a 'build' script to the root package.json that builds the web UI - Adds 'npm run build' after 'npm install' in install_node_deps() - Failure is a warning (not fatal) since the CLI works without the Web UI
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The install script runs
npm installbut never runsnpm run build, soweb_dist/is never created. Thepyproject.tomldeclareshermes_cli = ['web_dist/**/*']as package data, butweb_distonly exists after building the TypeScript web app.Result: fresh installs are missing the Web UI even though the CLI says everything succeeded.
Fix
buildscript that enters theweb/subdirectory, installs deps there, and runs the Vite build.npm run buildafternpm installininstall_node_deps(). Failure is a warning (not fatal) since the CLI works without the Web UI.Testing
Before the fix:
ls web_dist→ does not existAfter the fix:
ls web_dist→ contains built assets (or warning if build fails)