https://kotlinlang.org logo
#javascript
Title
# javascript
c

Császár Ákos

10/27/2023, 6:59 AM
Hi! Im trying to get npm packages from 2 different registries. As I saw it should be possible with this approach:
Copy code
registry=<http://serverA.url/repository-uri/>
//serverA.url/repository-uri/:_authToken=00000000-0000-0000-0000-0000000000000
//registry.npmjs.org/
But every time I try, it can't access the packages from registry.npmjs.org/. So my question is, is it possible to do this from the .npmrc file? If yes how should it look like and is it enough if I put it in the project root of my KMP project? My goal is to run the ./gradlew jsBrowserProductionWebpack task and collect every package from the defined registries.
a

Artem Kobzar

10/27/2023, 8:12 AM
@Ilya Goncharov [JB] do we have some DSL to define custom npm-registry inside the build.gradle?
i

Ilya Goncharov [JB]

10/27/2023, 10:14 AM
Hi, we don’t have DSL, but working with
.npmrc
in project dir should work. We do not process it on our side, Yarn do. I am not sure, that it support several npm registries apart from registry for scope https://stackoverflow.com/questions/32633678/is-there-any-way-to-configure-multiple-registries-in-a-single-npmrc-file
c

Császár Ákos

10/30/2023, 8:32 AM
Thanks! It worked with scoped packages.
3 Views