Improve "missing esbuild" error message
Nobody has claimed this yet.
- Dominant language
- PureScript
- Stars
- 831
- Forks
- 137
- PR merge metrics
- No merged PRs in 30d
Description
Hey there,
while I do think the current error message is quite okay...
Failed to find esbuild. See https://esbuild.github.io/getting-started/#install-esbuild for ways to install esbuild.
I'd suggest to extend it:
- Add the information that it is spago that failed to find it. If spago is executed directly it's easy to figure out. But if a project is executed (e.g. with webpack or vite), you see a bunch of error messages and one of them is this, it's not clear where this is coming from.
- Add why or what for
esbuildis missing. Again it might not be clear whyspago buildis working fine, and then another commandspago bundle-appis failing. Especially if the user is not directly running the command. So stating that spago relies onesbuildto bundle would be good to know.
Example purescript-react-vite-starter

Suggestion
Here are some suggestions with different wording. If one of them and the change in general is okay, I could open a pull request.
Spago failed to find esbuild, but bundling an PureScript code requires esbuild to be installed. See https://esbuild.github.io/getting-started/#install-esbuild for ways to install esbuild.
Spago was unable to find esbuild, yet esbuild must be installed in order to bundle PureScript code. See https://esbuild.github.io/getting-started/#install-esbuild for ways to install esbuild.
Failed to find esbuild. Spago relies on esbuild to bundle code. See https://esbuild.github.io/getting-started/#install-esbuild for ways to install esbuild.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/Spago/Build.hs around line 452, where the missing esbuild error is reported. Review how spago bundle-app reaches this message and update it to identify Spago and explain that esbuild is needed for bundling. Verify the revised wording when esbuild is unavailable, including the installation link.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100