Skip to content

fix: properly log error when dependency install fails #228

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

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

AdrianGonz97
Copy link
Member

closes #227

Copy link

changeset-bot bot commented Oct 27, 2024

🦋 Changeset detected

Latest commit: d69760c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sv Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Oct 27, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/sveltejs/cli/sv@228

commit: d69760c

Copy link
Member

@manuel3108 manuel3108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good, and probably it's just my testing that is flawed.

I created a project, edit one package inside package.json to a non existing version and executed this pr. It's still not printing anything.

Executing pnpm install by hand brings the following output with exit code 1

Output

ERR_PNPM_NO_MATCHING_VERSION  No matching version found for @sveltejs/adapter-auto@^30.0.0

This error happened while installing a direct dependency of D:\dev\web\svelte-cli-temp

The latest release of @sveltejs/adapter-auto is "3.3.1".

Other releases are:
  * next: 1.0.0-next.91

If you need the full list of all 113 published versions run "$ pnpm view @sveltejs/adapter-auto versions".
Progress: resolved 12, reused 12, downloaded 0, added 0

I'm assuming this is technically a pnpm error for not printing to stderr, but we probably should care about both.

@AdrianGonz97
Copy link
Member Author

I'm assuming this is technically a pnpm error for not printing to stderr, but we probably should care about both.

Yea, I think this is a pnpm bug. Tried testing out using the silent flag: pnpm i --silent and the process never ended. I think what we have now should be fine for the time being

Copy link
Member

@manuel3108 manuel3108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested this again with npm and everything works as expected there.

@manuel3108 manuel3108 merged commit d309df1 into main Oct 28, 2024
5 checks passed
@manuel3108 manuel3108 deleted the fix/throw-install-error branch October 28, 2024 17:40
@github-actions github-actions bot mentioned this pull request Oct 28, 2024
@AdrianGonz97 AdrianGonz97 mentioned this pull request Oct 28, 2024
AdrianGonz97 added a commit that referenced this pull request Oct 28, 2024
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.

"Successfully installed dependencies" despite failing to install eslint on an outdated node
2 participants