Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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"
like image 935
Manspof Avatar asked Mar 19 '18 19:03

Manspof


People also ask

Can not install yarn by npm?

To solve the error "yarn: command not found", install the yarn package globally by running npm install -g yarn and restart your terminal. If the command fails, run it with sudo and make sure the correct PATH is set in your system's environment variable.

How do I install yarn with npm?

The Yarn maintainers recommend installing Yarn globally by using the NPM package manager, which is included by default with all Node. js installations. Use the -g flag with npm install to do this: sudo npm install -g yarn.

Can yarn install all npm packages?

Yarn can consume the same package. json format as npm, and can install any package from the npm registry. This will lay out your node_modules folder using Yarn's resolution algorithm that is compatible with the node. js module resolution algorithm.

Does yarn install Dev dependencies by default?

yarn install is used to install all dependencies for a project. This is most commonly used when you have just checked out code for a project, or when another developer on the project has added a new dependency that you need to pick up.


1 Answers

I found a solution

yarn config set registry https://registry.npmjs.org
rm yarn.lock
yarn
like image 117
Manspof Avatar answered Oct 02 '22 23:10

Manspof