-
Notifications
You must be signed in to change notification settings - Fork 662
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
feat: return runtime versions used by the application with a doctor hook #1763
Conversation
@zimeg Hmm I tried creating a project w/ the
The debug log doesn't say much more than just "exit status 1" 🤷 any ideas? |
@filmaj uh oh... I don't that's related to the changes of that CLI branch but I've seen this before and forget why 🤔 From what I remember this is an error caused by this command: $ npm install --no-package-lock --no-audit --prefer-offline --progress=false --loglevel=verbose . I see something similar but different when I don't have Node installed. The project code is usually cloned alright but I'll have to The only guess I have is a local |
The debug logs don't seem to have much info for this either... Probably worth an improvement sometime soon |
Interesting, ok, thanks for the info. So the CLI actually created the app dir, and it seems to be populated. I can
Bizarre, because
|
📝 For the future searcher stumbling upon this, the following command fixes the "No matching version found" error: $ npm cache clean --force |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yass works great on node 18 and node 20.
Might need to add some more resiliency, or at least better error reporting, during the npm i
invocation upon creation of an app that uses these hooks. Follow-up PR? I'm not sure that I would ever be able to figure out something was wrong with installing npm dependencies without your hand holding.
|
||
/** | ||
* Standardized communication format between the SDK and CLI regarding runtimes. | ||
* @typedef DoctorResponse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look Ma, no build step!
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💪 🤧
@filmaj thanks for enduring the trials of testing this! I agree that much better errors can be reported for erroring installations, but will save this for a follow up. I'm not sure that it's possible to do this via hooks either (at least for the initial install) because the hooks wouldn't be installed yet! 🐣 Going tag this as a release after merging! Appreciate the quick review! 🏷️ |
Urgh as soon as I hit merge I noticed the PR title isn't prefixed with |
Summary
This PR introduces a
doctor
hook that returns runtime versions for the application's execution environment in a structured way. Thedoctor()
demonstrate the expected response shape!The
node
version is included in this response, as well as thev8
andmodules
version. TIL themodules
version can be a pain point when installing dependencies so thought it was worth including here.Open to any adjustments to output. These versions were taken from `process.versions`
Preview
Reviewers
Try this on your very own app with a special build of the CLI:
Requirements