dev-ui should run npm run dev not npm start#111
Merged
dr-frmr merged 1 commit intohyperware-ai:dr/gus-dev-ui-fixfrom Mar 20, 2024
gusapps:fix-the-dev-ui-command
Merged
dev-ui should run npm run dev not npm start#111dr-frmr merged 1 commit intohyperware-ai:dr/gus-dev-ui-fixfrom gusapps:fix-the-dev-ui-command
npm run dev not npm start#111dr-frmr merged 1 commit intohyperware-ai:dr/gus-dev-ui-fixfrom
gusapps:fix-the-dev-ui-command
Conversation
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
npm startcommand is conventionally used to start an application in its production environmentnpm run devcommand is a convention for starting an application in its development environmentnpm startwhen it should be runningnpm run devSolution
This PR is not a complete solution since it doesn't handle the production case AFAICT. A complete solution shouldn't naively replace
npm startwithnpm run dev, but conditionally run one over the other depending on wetherexecuteis called in production or development. I'm hoping someone with a higher-level view ofkitcan help implement that conditional.Docs Update
The
Argumentssection on this page would need updating: https://book.kinode.org/kit/dev-ui.htmlNotes
The reason this hasn't been a problem so far is because the Kinode template apps all use Vite, and Vite doesn't discriminate between start and dev even though you will find both scripts in its
package.json:But not all build tools are this laissez-faire. The React framework we are using for our app, NextJS, which uses Webpack under the hood, requires you to use a distinct
devcommand, and so does Webpack's rust-powered successor, Turbopack. If nothing else,devvsstartis a pretty established convention in web dev.