Duppie
Duppie

Reputation: 93

yarn create @scope/package references old version

I've been working on a npm/yarn create script which was once published under

@scopename/originalpackagename

After renaming the package name

@scopename/newpackagename

and removing the old package from npm registry I began getting an error when running

yarn create @scope/newpackagename somename

[1/4] Resolving packages...
verbose 0.174511263 Performing "GET" request to "https://registry.yarnpkg.com/@scope%2fnewpackagename".
verbose 0.385638523 Request "https://registry.yarnpkg.com/@scope%2fnewpackagename" finished with status code 200.
[2/4] Fetching packages...
verbose 0.396535904 Performing "GET" request to "https://registry.yarnpkg.com/@scope/originalpackagename/-/originalpackagename-1.4.0.tgz".
verbose 0.426215495 Error: https://registry.yarnpkg.com/@scope/originalpackagename/-/originalpackagename-1.4.0.tgz: Request failed "404 Not Found"

Upvotes: 1

Views: 455

Answers (1)

Duppie
Duppie

Reputation: 93

The issue was only tied to my local machine.

The problem was with the npm manifest located in my home directory.

~/.config/yarn/global/package.json ~/.config/yarn/global/yarn.lock

Which referenced the @scope/oldpackagename.

by removing the following files I was able to fix my problem.

rm ~/.config/yarn/global/package.json rm ~/.config/yarn/global/yarn.lock

Upvotes: 4

Related Questions