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

[Bug]: Issue with bun support #63

Closed
Blaquewithaq opened this issue Oct 17, 2023 · 5 comments
Closed

[Bug]: Issue with bun support #63

Blaquewithaq opened this issue Oct 17, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@Blaquewithaq
Copy link

Blaquewithaq commented Oct 17, 2023

Environment

Nuxt project info:

  • Operating System: Linux via WSL
  • Node Version: v18.16.0
  • Nuxt Version: 3.7.4
  • CLI Version: 3.9.0
  • Nitro Version: 2.6.3
  • Package Manager: bun@1.0.6
  • Builder: -
  • User Config: devtools
  • Runtime Modules: -
  • Build Modules: -

What went wrong?

When using bun as the default package manager, the commands still use npm as the default manager.

I'm running linux in WSL on windows. I dont have npm install, only bun.

I've checked the developer logs on vscode to find this:

image

How to reproduce it?

Create an environment with ONLY bun (NO NPM). And try to update dependencies or install modules via the Nuxtr extension.

@Blaquewithaq Blaquewithaq added the bug Something isn't working label Oct 17, 2023
@Blaquewithaq
Copy link
Author

Blaquewithaq commented Oct 17, 2023

Update on the issue:

I downloaded the extension repo and went digging around.

  1. bun doesn't have a version of this command: npm view ${package} versions
  2. bun when run does replacements of everything related to npm,yarn,pnpm,etc,
    therefor since there isn't a bun replacement command for this functionality, it is not replaced and therefor wont work.

The closest thing they have is bun pm ls which only lists the locally installed packages.

My idea for a solution (that will work for all) is to call the npm registry via their api and get the versions that way.

@adhamfarrag
Copy link
Member

I love your excitement and thanks for making the time to do the PR! But I wish you discussed it first before making the time to implement it..

We're refactoring this feature soon and I'll consider your solution.

@adhamfarrag adhamfarrag closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
@Blaquewithaq
Copy link
Author

I love your excitement and thanks for making the time to do the PR! But I wish you discussed it first before making the time to implement it..

We're refactoring this feature soon and I'll consider your solution.

No problem! If anything was fun to figure out. Cant wait to see what you've got in store

@adhamfarrag
Copy link
Member

adhamfarrag commented Oct 18, 2023

@Blaquewithaq Do you face any other issues with Linux via WSL?

@Blaquewithaq
Copy link
Author

Blaquewithaq commented Oct 18, 2023

@Blaquewithaq Do you face any other issues with Linux via WSL?

Yes, there is another problem I came across after doing this PR. The function getOutdatedPackages needs to be reworked because bun does NOT have the command: bun outdated. This causes the update dependencies icon (in the status bar) to always be loading.

I did find an issue for the missing feature and it looks like it may be added in the future:
oven-sh/bun#1223

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants