Search code examples
node.jsreact-nativenpmyarnpkg

yarn install throw error request failed \"404 Not found"


I have react native project that I worked on my laptop. when I transfer the project to my pc and run yarn install (I installed the some modules using yarn and some using npm) I get

An unexpected error occurred: "https://registry.yarnpkg.com/jest/-/jest-23.0.0-alpha.0.tgz: Request failed \"404 Not Found\"".

Yarn version on my pc and latop same

1.5.1

npm version my pc and latop same

5.4.1

node version

v 7.9.0

in addition i get warning when run yarn install on my project

warning You are using Node "7.9.0" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"

Solution

  • I found a solution

    yarn config set registry https://registry.npmjs.org
    rm yarn.lock
    yarn