fix: move esbuild from devDependencies to dependencies#69
Open
tduong-godaddy wants to merge 1 commit into
Open
fix: move esbuild from devDependencies to dependencies#69tduong-godaddy wants to merge 1 commit into
tduong-godaddy wants to merge 1 commit into
Conversation
esbuild is imported at runtime in src/services/extension/bundler.ts and transitively loaded on CLI startup via src/core/applications.ts. Because it was in devDependencies, it was not installed when users installed @godaddy/cli from npm, causing ERR_MODULE_NOT_FOUND errors on all commands including --version. The CLI only worked for users who happened to have esbuild installed in their project or globally, making this a silent packaging bug. This fix ensures esbuild is always available at runtime. Fixes versions: 0.5.1, 0.5.2, 0.5.3 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
llessa-godaddy
left a comment
Contributor
There was a problem hiding this comment.
Needs changeset. Otherwise PR is ✅
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 published npm package (@godaddy/cli versions 0.5.1, 0.5.2, 0.5.3) is broken for users who don't have
esbuildinstalled locally. When running any command (includinggodaddy --version), users encounter:Root Cause
esbuildis imported insrc/services/extension/bundler.tssrc/cli-entry.tsimportsapplicationCommandsrc/cli/commands/application.tsimports fromcore/applicationssrc/core/applications.tsimports fromservices/extension/bundlerbuild.mjsmarks esbuild as external (not bundled)esbuildwas indevDependencies, notdependenciesSince
devDependenciesare not installed when users install the package from npm, the CLI fails immediately on any command.Why Some Users Could Use It
The CLI worked for users who happened to have
esbuildinstalled:node_modules(for their own build process)Node.js module resolution finds esbuild in parent directories, masking the packaging bug.
Solution
Move
esbuildfromdevDependenciestodependenciesso it's always installed with the CLI package.Testing
Before fix (with esbuild not available):
npm install -g @godaddy/cli@0.5.3 godaddy --version # Error: Cannot find package 'esbuild'After fix:
With this PR, esbuild will be installed automatically with the CLI.
Impact
This fix will allow all users to use the CLI without requiring a separate esbuild installation, fixing the broken 0.5.x releases.