How to publish a package with a dependenciy under another registry #3760
-
I'm publishing my package under a workspace with {
"name": "com.bbbirder.pkg-in-workspace",
"version": "0.0.43",
"dependencies": {
"com.bbbirder.another-local-package": "1.0.3",
"com.another-registry.remote-package": "1.10.1"
}
} As u can see abow, the dependency When I execute lerna ERR! Error: Command failed with exit code 1: npm install --package-lock-only --ignore-scripts
lerna ERR! npm ERR! code ETARGET
lerna ERR! npm ERR! notarget No matching version found for com.another-registry.remote-package@1.10.1.
lerna ERR! npm ERR! notarget In most cases you or one of your dependencies are requesting
lerna ERR! npm ERR! notarget a package version that doesn't exist.
lerna ERR! So, is there a way to let lerna recognize thirty-party(not the npmjs.org) dependency, or mark the dependency as remote, or just skip the dependenting check? Thx |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Uh yeah, I found a resolution then. |
Beta Was this translation helpful? Give feedback.
-
Hi @labbbirder, you can configure different registries to use for different package scopes. If your packages in the other remote registry follow a consistent unique scope pattern, then the npm install shouldn't fail. See the npm scope docs for details on how to configure this. |
Beta Was this translation helpful? Give feedback.
Uh yeah, I found a resolution then.
I clone the remote package into my workspace, and ignore it in git.
and then everything works well.