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

Can't run bun pm cache outside of a project #16101

Open
tcyrus opened this issue Jan 1, 2025 · 0 comments
Open

Can't run bun pm cache outside of a project #16101

tcyrus opened this issue Jan 1, 2025 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@tcyrus
Copy link

tcyrus commented Jan 1, 2025

What version of Bun is running?

1.1.42+50eec0025

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What steps can reproduce the bug?

Run bun pm cache in a non-project directory

What is the expected behavior?

PS C:\Users\me> bun pm cache
C:\Users\me\.bun\install\cache

What do you see instead?

PS C:\Users\me> bun pm cache
error: No package.json was found for directory "C:\Users\me"
note: Run "bun init" to initialize a project

Additional information

PackageManager doesn't appear like it can be created without a package.json (code).

I'm not sure if this makes sense, since the Global Cache should fall back to the Global Config (.bunfig.toml) if run outside of a project.

@tcyrus tcyrus added bug Something isn't working needs triage labels Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant