Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 1

Move NPM package to other repo "Package is already associated with another repository".

I would like to move a package from one repository to another.

 

Consider this:

I have an organisation at "@org"

I have 2 packages associated with one 'monorepo' "github.com/org/test" called "@org/test1" and "@org/test2"

No I want to move "@org/test1" to its own repo in the organisation like "github.com/org/test1"

I change the repo in "package.json" like this:

 

"name": "@org/test1",
  "publishConfig": {
    "registry": "https://npm.pkg.github.com/"
  },
  "repository": {
    "type": "git",
    "url": "ssh://git@github.com/org/test1.git",
    "directory": "packages/test1"
  },

But I am getting this error:

422 Unprocessable Entity - PUT https://npm.pkg.github.com/@org%2ftest1 - Package "test1" is already associated with another repository.

How can I change this? Since the package stays in the namespace I expect this to work just fine.