-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: [Errno 2] No such file or directory: 'add' #3708
Comments
Thanks for reporting but there is not enough information to act on this. |
So whenever I am trying to add a package with yarn, lets say it throws an error which is, And it is behaving the same way for 'install' and 'init' as well |
@SDhalor I had this issue as well. Running it with |
Thank you but it did not work for me |
i am also facing same issue |
I was facing the same problem. I am using Ubuntu (17.04) and used sudo apt install yarn to install yarn. This however, did not install yarn, but a package named cmdtest. You need to follow the installation instructions on the website https://yarnpkg.com/lang/en/docs/install/ and add a repo first. This will then include the correct yarn, but there will still be a conflict when running apt install yarn, since cmdtest is still there. To correct this run the following command: Then run sudo apt install yarn and yarn init should work properly. |
Thanks @rickovermars ! Worked for me ! 😄 |
I am attempting to install yarn on Debian 9 (stretch). I followed the instructions on and it seemed to install correctly (I also setup the path as well), I could run
I then followed the steps provided by @rickovermars but that also results in the same output/error message. Any thoughts on why yarn add fails on Debian 9? Also, I tried installing via one of the alternatives: |
Well this is interesting, I left my Debian up and running all night long and this morning from within Visual Studio Code and its terminal window I ran: dlazov@zovs-debian:~/projects/checkout-app$ yarn add @webcomponents/webcomponentsjs So what I discovered (and shame on me) is that I had to restart my terminal. That was slightly disturbing and embarrassing. So all is well in linux... |
I had to run |
On
then following https://yarnpkg.com/lang/en/docs/install/
and using
Test - version should be more than 0.2X (in my case)
|
I did not remove the yarn/cmdtest package before to use the command to override the installation of yarn:
Now when I try to install it, I get: Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'cmdtest' instead of 'yarn'
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded. Any idea to how to revert/remove the |
Everything you guys had said, I finally followed @yami12376 instructions but I was still getting cmdtest installing. I had to sudo apt update before running sudo apt-get -o Dpkg::Options::="--force-overwrite" install yarn Now everything works. |
ubuntu 17.10 |
@dmz9 It works for linux mint 18.3 as well. Thanx! |
its so simple just follow me step to step 👍
and later cd go to dir in your app **important everybody forgets it ;) **
|
Install Yarn for Ubuntu 18.04 LTS reference to link: https://qiita.com/shaching/items/a1e8bf937f1ad049b8cd |
if you have a problem while installing yarn you can simply remove the yarn like [cmdtest] by curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt-get update && sudo apt-get install yarn |
Still seeing this on ubuntu 18.04, I hope this will be fixed soon. It's somehow confusing at the first sight. |
running with sudo has worked with me perfectly |
damn useful !!! ubuntu 18.10 . cannot understand why installing yarn is so painful. |
this solved my issue |
@bethwelt , thanks mate, your solution worked for me! |
My issue was copying and pasting both commands as listed in the yarn install guide at one time:
In doing so, the second was not executed. This was verified after inspecting /etc/apt/sources.list. As a result, the yarn package was never made available to If you run |
thank |
Another quick workaround is to install yarn via npm
|
if the error persists after trying to install yarn, close terminal and open a new terminal |
First, remove cmdtest, so run npm install yarn -g. Reload the terminal. |
It worked awesome |
I am using the latest stable release of Ubuntu OS, I had the same issue, but then, I followed the installation guide here, and everything worked perfectly. |
Do as arasemami he said , everything will work fine. |
|
ERROR: [Errno 2] No such file or directory: 'add'
this is the error i get when I try running yarn add
my current yarn version is 0.10.
The text was updated successfully, but these errors were encountered: