Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve typegen error handling #162

Merged
merged 2 commits into from
Dec 3, 2023
Merged

Improve typegen error handling #162

merged 2 commits into from
Dec 3, 2023

Conversation

StuartHarris
Copy link
Member

@StuartHarris StuartHarris commented Dec 3, 2023

Fixes #161

Improves error handling during typegen and adds TypeGenError::PnpmNotFound in order to catch the more common error of not having pnpm installed. The error now looks like this:

cargo build
   Compiling shared_types v0.1.0 (/Users/stuartharris/src/redbadger/crux/examples/simple_counter/shared_types)
error: failed to run custom build command for `shared_types v0.1.0 (/Users/stuartharris/src/redbadger/crux/examples/simple_counter/shared_types)`

Caused by:
  process didn't exit successfully: `/Users/stuartharris/src/redbadger/crux/examples/simple_counter/target/debug/build/shared_types-8703d4b47d26cc47/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=../shared

  --- stderr
  Error: `pnpm` is needed for TypeScript type generation, but it could not be found in PATH.
  Please install it from https://pnpm.io/installation

  Caused by:
      No such file or directory (os error 2)

@StuartHarris StuartHarris merged commit 85eadcc into master Dec 3, 2023
18 checks passed
@StuartHarris StuartHarris deleted the catch-no-pnpm branch December 3, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not pnpm install: Os
1 participant