-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Support reading from .npmrc #643
Comments
Is there any workaround? |
Waiting to this feature to try bun on my current project. Is there any workarounds? |
@Jarred-Sumner do you have any plan about reading .npmrc file. It's most important thing if bun is working as a package manager |
+1 for me. Particularly, I need support for Incidentally, I duplicated my config in |
As a @Trendyol (https://github.com/trendyol) We would like to use bun in PoC but It doesn't work with private registry 😢 |
This is very important if we want |
Same problem here. I just installed bun for one of two speed-up PoCs at my day-job. The project depends on a private repository though. |
+1 support this plz |
@sayjeyhi There is a tweet by one of the creators showing steps to include a private registry and it worked! https://twitter.com/jarredsumner/status/1555832429276827648?s=20&t=coxDA6eH02_3REEZBRwr-A |
@drabelo That doesn't work for me (bun 0.4 & private nexus repository). Is there a way to find out that bun even sees the |
However if I override each individual private package like this:
It seem to be working fine. Thanks, @drabelo ! |
Supporting the global |
Preventing my organisation from experimenting with bun. Would appreciate this. |
@drabelo 's solution works and has the added benefit of being safer than local .npmrc files https://twitter.com/jarredsumner/status/1555832429276827648?s=20&t=coxDA6eH02_3REEZBRwr-A |
Does somebody has any idea how |
Running into the same issue as you @ciprianglg at the same time it looks like. The URL in the error logs when doing |
Btw I also use the |
@martinothamar the same behavior on my side, if i click the link i can download it. |
The error message looks like this one to me, if that helps: https://github.com/oven-sh/bun/blob/bun-v0.5.9/src/install/install.zig#L3858 I'm on version v0.5.9 |
@martinothamar have you managed to get Bun working with Azure Artifacts? |
No, this was a PoC for me so didnt have much time to debug unfortunately |
Anyone was able to figure it out? Looks like bun sometimes completely ignores the bunfig. Moreover if I use ==EDIT Ok, spent a bit more time looking through logs/versions. I have a gcp artifact registry, defining it as follows in the config
then do the And trying to install
So it looks like even tho bun downloaded the package, it still tries to resolve it through the default registry and fails. In fact, w/o clearing the has the same thing happens. Am I doing something wrong? Tried older versions to no avail |
ok, nvm, totally my fault: yarn publish for some reason botches tarball location and even tho it publishes to the private registry, it puts |
workaround with [install]
registry = "https://yourPrivateRegistry.io" see |
There are a solution for azure arctifacts ? It still not working 😢 |
@Electroid Will |
I faced issues while trying to setup UPD: But supporting |
@sashalavron Try to use the access token instead. It works fine for me. However, not all the artifacts are going to be downloaded because of the issues mentioned here and here |
@it-can Sorry to ping you, but I'm uncertain if you monitor that issue. Did you try that in a GitHub action? That works locally for me, but the runner always gets a 401 response, doesn't matter what I'm doing |
no only using this locally |
For some reason it doesn't seem like it's replacing env variables when used in a URL.
this results in:
Has anyone managed to get past this? |
+1 to support the .npmrc No luck with Gihub packages. I'm running into error: error: ERR_TLS_CERT_ALTNAME_INVALID downloading package manifest @company-group/package |
As others have noted, even when I move the details from npmrc the repo we have is expecting %2f rather than / |
I've created #5076 to call this out specifically. |
Same issue.
but |
This may be due to the same issue I am having where it encodes /'s different to how NPM does. There is already an issue raised for this which @jbidston has mentioned |
Sharing this working bunfig.toml we used in our project. Works for private npm registries.
|
Also posting my working solution: #4654 (comment) |
Is this still on the list? In companies with on-prem private registries and lots and lots of projects with a npmrc this is so annoying. Pretty please with sugar on top? |
I recently made a tool to set repository's credentials for gcp's artifact registries in this repo. |
Sharing some gotchas in case it can help resolve someone's errors (404/401) : #4654 (comment) |
I am working on this right now (WIP PR here) |
Support for reading If you want to try it before Bun v1.1.18 is released: bun upgrade --canary If reading |
@Jarred-Sumner would be great to adjust the documentation, since the following is not valid anymore: https://bun.sh/docs/install/registries#npmrc |
@Jarred-Sumner please update the docs so that new users know it's supported. It took me to search web to realise i can use npmrc. thank you. |
it apparently doesn't read from $HOME/.npmrc though |
What is the problem this feature will solve?
npm is configured by a
.npmrc
, but currently, bun seems to require the configuration to be duplicated to abunfig.toml
file.What is the feature you are proposing to solve the problem?
For
bun install
to support reading from the.npmrc
file.What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: