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"
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.
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.
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.
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.
I found a solution
yarn config set registry https://registry.npmjs.org
rm yarn.lock
yarn
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With