Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
452 votes
25 answers
452k views

Yarn install command error No such file or directory: 'install'

I am installing sylius bundle and while install sylius I need to run yarn install So While I run the command: yarn install I get the error: ERROR: [Errno 2] No such file or directory: 'install'
Ricky ponting's user avatar
366 votes
26 answers
551k views

The engine "node" is incompatible with this module

I am getting below yarn error when deploying to AWS: error [email protected]: The engine "node" is incompatible with this module. Expected version ">=6 <7 || >=8". Got "...
JN_newbie's user avatar
  • 5,902
363 votes
6 answers
164k views

What is the closest to `npm ci` in yarn

In npm, there's a ci command for installing the project with a clean state. In the documentation, it is claimed that: It can be significantly faster than a regular npm install by skipping certain ...
shabunc's user avatar
  • 24.3k
214 votes
7 answers
63k views

When to use Yarn over NPM? What are the differences?

What are the differences between Yarn and NPM? At the time of writing this question I can only find some articles on the Internet showing what's the Yarn equivalent of an NPM command. Do they have the ...
Asha's user avatar
  • 4,101
210 votes
15 answers
297k views

Yarn global command not working

I'm working with Yarn v0.16.1. If I understand correctly (according to the documentation), yarn global add <package> should be the equivalent of npm install -g <package>. However, when I ...
jaredsk's user avatar
  • 2,706
204 votes
12 answers
256k views

Yarn - How do I update each dependency in package.json to the latest version?

I have a react app with deprecated dependencies. To make it work, I have to update the dependencies to their newer (but stable) versions. As per this stakoverflow thread, to update dependencies in ...
DevLoverUmar's user avatar
  • 13.4k
201 votes
4 answers
213k views

How to install package with local path by Yarn? It couldn't find package

In my package.json I'm pointing local package my-custom-i18n by its relative path: package.json "dependencies": { "core-js": "^2.4.1", "my-custom-i18n": "...
michalczukm's user avatar
  • 10.3k
188 votes
15 answers
224k views

Module not found: Error: Can't resolve 'core-js/es6'

I've got a problem with my build process in relation to my React app. I always get the following error: Module not found: Error: Can't resolve 'core-js/es6' if I use this in a polyfill.js: import '...
Gutelaunetyp's user avatar
  • 2,092
179 votes
7 answers
121k views

Should I commit yarn.lock and package-lock.json files?

We're using yarn for all our deterministic pkg installations but don't prevent the user from using npm - I'm guessing having both these files will cause issues however. Should one be added to your ....
BisonAVC's user avatar
  • 2,040
177 votes
5 answers
177k views

npm equivalent of yarn resolutions?

Is there an npm equivalent of the yarn resolutions functionality? There is no mention of it in the npm package.json docs. For example, I want to install [email protected] and one of its dependencies (@lerna/...
adanilev's user avatar
  • 3,268
163 votes
3 answers
127k views

What is the equivalent of "npm install <package_name> --save" in Yarn?

I am using Yarn to install the dependencies of my project. What is the equivalent of "npm install <package_name> --save " in Yarn to update the entry in my package.json file? I can use ...
Manivannan's user avatar
  • 3,204
161 votes
4 answers
74k views

How do you resolve Git conflicts in yarn.lock

When multiple Git branches modify the dependencies in a project that uses Yarn, it is likely to introduce a conflict in the yarn.lock file. It is not a good idea to delete and regenerate the yarn.lock ...
Christian Schlensker's user avatar
146 votes
3 answers
103k views

How do I override nested dependencies with `yarn`?

If my package has these dependencies { "name": "my-package", "dependencies": { "foobar":"~1.0.3", "baz":"2.0.9" } And the foobar package has these dependencies { "name": "foobar", "dependencies"...
Chris W.'s user avatar
  • 38.7k
144 votes
3 answers
173k views

How to update package-lock.json without doing npm install?

Question What is the way to update/generate package-lock.json without making a real installation of node_modules (what npm install does)? I want just a valid package-lock.json based on my package.json,...
S Panfilov's user avatar
  • 17.3k
142 votes
9 answers
154k views

Why is WSL extremely slow when compared with native Windows NPM/Yarn processing?

I am working with WSL a lot lately because I need some native UNIX tools (and emulators aren't good enough). I noticed that the speed difference when working with NPM/Yarn is incredible. I conducted a ...
WrRaThY's user avatar
  • 1,868
138 votes
12 answers
100k views

is there a yarn alternative for npm audit?

need pinned resolution feature of yarn, but also want to audit with npm audit? Is there a yarn alternative to npm audit? Or, alternately, will pinning resolutions of dependencies of dependencies work ...
sjt003's user avatar
  • 2,537
129 votes
6 answers
161k views

How to ignore incompatible engine "node" error on installing npm dependencies with yarn?

Given this package.json: { "name": "yarn-install-fail", "version": "1.0.0", "description": "", "main": "index.js", "scripts": {}, "author": "", "license": "ISC", "dependencies": { ...
k0pernikus's user avatar
  • 64.7k
117 votes
2 answers
144k views

Node engine 8.x or 10.x in package.json

I tried to specify the node engine in a package.json to accept both 8 and 10 version. I tried to type this: "engines": { "node": "8.x|10.x" }, But running yarn results in: The engine "node" is ...
rap-2-h's user avatar
  • 31.4k
111 votes
6 answers
148k views

Yarn not installing in nvm version node version

I'm running into an issue with yarn when I change my nvm version of node. I noticed when I check my ~/.nvm folder I see two node versions. v8.11.0 v8.11.3. I installed yarn globally. using npm ...
me-me's user avatar
  • 5,609
104 votes
10 answers
202k views

How do I change the version of yarn used?

I used Homebrew to install yarn. Running yarn -v shows that I currently use 0.23.2. I ran brew upgrade yarn to get the latest version, which is 0.24.6. After Homebrew successfully upgrades yarn, I run ...
davidhu's user avatar
  • 10.1k
103 votes
7 answers
243k views

What does " yarn build " command do? Are " npm build " and "yarn build" similar commands?

What does yarn build command do ? Are yarn build and npm build the same? If not what's the difference?
sudipt dabral's user avatar
102 votes
8 answers
115k views

How to install a list of many global packages with Yarn

yarn install -h suggests that the -g (global) option is DEPRECATED. How am I supposed to indicate that I want a bunch of packages (from package.json / yarn.lock files) to be installed globally? ...
jleeothon's user avatar
  • 3,056
97 votes
3 answers
107k views

How can I update/downgrade package version with yarn?

I have a package and I want to downgrade the version use. How can I do this with yarn "dependencies"?
Emre's user avatar
  • 1,081
92 votes
7 answers
174k views

punycode is deprecated in npm - what should I replace it with?

I'm using the npm module punycode in my Angular project. VsCode tells me it's deprecated and https://nodejs.org/api/punycode.html#punycode_punycode confirms: The version of the punycode module ...
Ben Taliadoros's user avatar
87 votes
22 answers
104k views

An unexpected error occurred: "EPERM: operation not permitted in Yarn

I am having problems installing new npm packages with Yarn. Every time I go on to add a new package it's throwing me this error. But when I delete my node_modules folder and run Yarn, everything works ...
Pranta's user avatar
  • 3,476
84 votes
4 answers
58k views

Why wouldn't I use npm to install yarn?

In the blog post announcing yarn (an alternative npm client) they say, "The easiest way to get started is to run npm install -g yarn". But if you go to the "install yarn" page in their docs, "npm ...
Chris Arnesen's user avatar
82 votes
4 answers
142k views

What is the difference between yarn run and npm start?

Is yarn run intended to be the equivalent of npm start?
daniely's user avatar
  • 7,633
80 votes
6 answers
104k views

Why does yarn install dev dependencies but I just need the builds?

If I use yarn add <package-name>, Yarn will install both dependencies and devDependencies of <package-name>. Is it intended? I checked the documentation but I couldn't find a way to ...
vdegenne's user avatar
  • 13k
72 votes
3 answers
102k views

Install devDependencies and dependencies together with yarn

Is it possible to install devDependencies and dependencies together with yarn? For example, if I want to install react and webpack. React is a dependency and webpack is a dev dependency. To install ...
Pranesh Ravi's user avatar
67 votes
8 answers
91k views

npm ERR! Unsupported URL Type "workspace:": workspace:*

I'm creating a new project with gatsby gatsby new YourProjectName2 https://github.com/Vagr9K/gatsby-advanced-starter and get an error: info Creating new site from git: https://github.com/Vagr9K/gatsby-...
pcatre's user avatar
  • 1,614
67 votes
4 answers
46k views

What is the difference between brew, yarn, and npm?

I was using the react-native package which I installed globally with npm. Now it says at the first line after executing the init command. The following: Installing react-native from npm... Consider ...
user007's user avatar
  • 1,624
60 votes
14 answers
90k views

Hanging/stuck reify:prettier: timing reifyNode:node_modules/@nrwl/workspace Completed in 12729ms

Details: ? Workspace name (e.g., org name) swag ? What to create in the new workspace angular-nest [a workspace with ...
Stackoverfall's user avatar
59 votes
1 answer
24k views

What is main difference between yarn and npm? [closed]

I want to ask what is your favorite package manager for JS ? I saw some articles about yarn and npm. But I am not sure what can be better for me. I just start learning JS. Right now difference ...
user avatar
59 votes
2 answers
20k views

What is the difference between yarn.lock and npm's shrinkwrap?

Recently I tried installing my Node packages with Yarn. It works great and it's a lot faster than NPM. Yarn automatically generates yarn.lock. We already have NPM shrinkwrap (npm-shrinkwrap.json). Is ...
Fizer Khan's user avatar
  • 91.3k
58 votes
30 answers
234k views

Error: yarn start - error Command "start" not found

I am trying to learn React and I am using a private repo to start with it. I run yarn start in the directory of the repo but I get the error message: yarn run v1.13.0 error Command "start" not found....
Magofoco's user avatar
  • 5,348
57 votes
2 answers
95k views

Yarn local packages dependencies

I have the following folder structure: ~ (user home folder) - api ... - package.json - lib - libA ... package.json - libB ... package.json In libA/package....
Laxmana's user avatar
  • 1,656
55 votes
23 answers
57k views

Issue with babel-jest dependency when running npm start in a React app

All I am doing is running create-react-app and cd'ing into the app, then trying to run npm/yarn start. I get the following error/output/log. I have walked through all of the suggested steps. The only ...
jasonspiller's user avatar
55 votes
8 answers
30k views

How to make create-react-app use npm instead of yarn?

I kind of rushed into creating a React app based on a tutorial that used yarn. Now I'm going to re-create the app from scratch because I'm not satisfied with the reactstrap library, and I'd like to ...
Jack BeNimble's user avatar
55 votes
12 answers
78k views

Pass command line -- argument to child script in Yarn

I have a package.json that looks similar to this: "scripts": { "dev": "cross-env BABEL_ENV=client webpack --config webpack/client.development.js && yarn dev:stub-server | cross-env ...
Luciano M. L.'s user avatar
55 votes
3 answers
23k views

What does "Linking Dependencies" during npm / yarn install really do?

For large web apps npm install resp. yarn install does take a lot of time, mostly in a step called Linking Dependencies. What is happening here? Is it fetching the dependencies of the dependencies? Or ...
medihack's user avatar
  • 16.5k
51 votes
1 answer
23k views

What is the difference between yarn.lock and npm's package-lock?

I accidentally ran npm install in a project that uses Yarn and noticed that npm created a package-lock.json file. I know that Yarn spiked in popularity in part because it used a lockfile to produce ...
fny's user avatar
  • 32.9k
49 votes
7 answers
173k views

How do I create a React Native project using Yarn?

I am running the following commands in the DOS console on a Windows 7 (64-bit) machine. npm install -g yarn yarn add global react-native yarn add global react-native-cli react-native init sample ...
Prabhakaran Ramaswamy's user avatar
49 votes
1 answer
36k views

What is the NPM equivalent of "yarn install --frozen-lockfile"?

I'm using npm as part of me building the production docker image. I want to make sure the package-lock.json doesn't change and matches.
user972014's user avatar
  • 3,736
47 votes
2 answers
13k views

Switch to npm for create-react-app

I recently installed yarn on my machine but was using npm before. For my current project in React I want to use npm again. However, if I run create-react-app it is built with yarn. How can I switch ...
Oliver's user avatar
  • 1,181
46 votes
2 answers
22k views

yarn upgrade to fix yarn audit errors

So, as of now, it appears that there is no yarn audit --fix, so I am trying to figure out how to go about fixing my yarn audit errors. I have tried a yarn upgrade which has fixed some of the errors (...
Ken Bigler's user avatar
45 votes
6 answers
61k views

Yarn run multiple scripts in parallel

I'm migrating from NPM to Yarn, and I want to run scripts in parallel such as: npm-run-all --parallel script1 script2 script3 What is its equivalent in Yarn? What I found as its equivalent is to ...
belhadj haythem's user avatar
44 votes
5 answers
55k views

Github actions, 401 unauthorized when installing a Github Package with npm or yarn

When I try to install my npm modules from a GitHub action I get the following error: npm ERR! 401 Unauthorized - GET https://npm.pkg.github.com/@xxxx%2fxxxx-analytics - Your request could not be ...
MLyck's user avatar
  • 5,575
43 votes
3 answers
9k views

Moving away from Bower (discontinued) to use Yarn/Npm instead (.Net Core MVC) VS2017

I started working on a .Net Core application around 1 year ago. I used .Net Core to set up my project in visual studio and used Bower to manage my client side packages. It seems bower is being ...
Zeliax's user avatar
  • 5,306
42 votes
5 answers
34k views

How do I use multiple npm registries in Yarn?

I'm trying to setup Yarn 0.17.9 in our environment but I have a problem with our registry. We are currently using two registries, official npmjs and our own registry on internal network (Sinopia). ...
kraklin's user avatar
  • 546
40 votes
6 answers
42k views

Yarn, node-gyp rebuild compile error, node_modules/fsevents: Command failed

I am using Yarn to handle the packages. yarn install shows the error regardless of the package that I use but the install looked like it successfully finished and files are set under node-modules ...
whitebear's user avatar
  • 12k

1
2 3 4 5
29