How do I change the version of yarn used?
yarn policies set-version <version number> Per https://github.com/yarnpkg/yarn/issues/7146#issuecomment-477809216
yarn policies set-version <version number> Per https://github.com/yarnpkg/yarn/issues/7146#issuecomment-477809216
The following steps work: Add the following line to package.json: “resolutions”: { “@babel/preset-env”: “7.5.5” }, Run the following command: $ npx npm-force-resolutions Install dependencies: $ npm install # or $ yarn Build your project: $ yarn build Take a look at this Github Issue
Reinstalling a package after just deleting the node module works with: yarn install –check-files
You can indeed ignore such errors via –ignore-engines: $ yarn install –ignore-engines yarn install v0.24.5 info No lockfile found. [1/4] Resolving packages… [2/4] Fetching packages… [3/4] Linking dependencies… [4/4] Building fresh packages… success Saved lockfile. Done in 1.41s. This is also documented in the command’s help: $ yarn help | grep — –ignore –ignore-scripts don’t … Read more
If you do in fact have a sub-dependency that is overly restrictive in what versions it will accept, you can override them using yarn. UPDATED EDIT: Yarn now, as of 1.0, officially supports the “resolutions” block. So the way to override resolutions is to just add a block like this to package.json: “resolutions”: { “package-a”: … Read more
Just create a .babelrc file in the root of your project and add: { “presets”: [“@babel/preset-env”, “@babel/preset-react”] }
yarn upgrade-interactive –latest But you have to have a yarn.lock file before do it. If you are using npm, you must delete package-lock.json first. Then run yarn to create structure. After that you can do upgrade-interactive. Without that, yarn shows upgrade, but no changes and effects in package.json.
It looks like that I was trying to execute the wrong yarn, because simply running sudo apt install yarn on my Ubuntu 18.04 gave me yarn from cmdtest. So I solved by uninstalling it: sudo apt remove yarn And by installing it as the official website explains, which in my case (Ubuntu 18.04) it was … Read more
It is only a warning as it won’t actually stop your code from running, It’s just there to give you a heads up that there’s something wrong with your dependencies. Effectively, peer dependencies are a way for packages to specify, “to use me, you should also have x version of y package installed”. You should … Read more
What is a peer dependency Here is some useful reading on dependency types, and here is info on peer dependencies, but to summarize: Dependency: A library/package your project needs to run. Peer dependency: Used to indicate a library/package your project will hook in to. The package vue-loader has a peer dependency on vue-template-compiler – vue-loader … Read more