NPM continues to refer to an incorrect URL. Can not point to a new URL

I accidentally made a typo in package.json, namely

git@gitlab.com/user/repo
git@gitlab.com: user / repo

I corrected this typo but on a machine where I had already run npm install he continues to throw an error with references to / user / repo instead of the new URL. I've already verified that the package.json file contains the new : user / repo and I cleaned the cache with npm cache clean.

It's the error:

npm WARN addRemoteGit Error: Command failed: git config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit on ChildProcess.exithandler (child_process.js: 275: 12)
npm WARN addRemoteGit at emitTwo (events.js: 126: 13)
npm WARN addRemoteGit on ChildProcess.emit (events.js: 214: 7)
npm WARN addRemoteGit at MaybeClose (internal / child_process.js: 925: 16)
npm WARN addRemoteGit on Socket.stream.socket.on (internal / child_process.js: 346: 11)
npm WARN addRemoteGit on emitOne (events.js: 116: 13)
npm WARN addRemoteGit on Socket.emit (events.js: 211: 7)
npm WARN addRemoteGit on Pipe._handle.close [as _onclose] (net.js: 567: 12)
npm WARN addRemoteGit git + ssh: //git@gitlab.com/user/repo.git#semver: ^ 1.0.0 reset directory /home/admin/.npm/_git-remotes/git-ssh-git-git- remote gitlab-com -user-repo-git-semver-1-0-0-6561b76d because of error: {error: command failed: git config --get remote.origin.url

It continues a little later. What could be the problem here?