Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

path variable of yarn

Tags:

linux

yarnpkg

I have installed yarn in my 16.04 LTS version according to this tutorial tutorial

have added the environment path as well, but the termial does not take any yarn commands.

on typing yarn init, it gives ::-

ERROR: [Errno 2] No such file or directory: 'init'

same for when i type yarn global bin ::-

ERROR: [Errno 2] No such file or directory: 'global'

I think it is because of the PATH variable issue, can anyone tell me what else i need to add.

Thanks

like image 571
Aakash Avatar asked Jan 20 '26 01:01

Aakash


1 Answers

So i found the resolution to this problem . their is a package called cmdtest which was installed in my system, which also contained a package called yarn. This yarn was conflicting with the yarnpkg, and when i was running yarn init or any other yarn commands it was probably running that yarn package with the argument, hance the error. the yarn --version and which yarn was running correctly which further convoluted the issue. i uninstalled cmdtest and installed yarn again which fixed the issue. More details about this issue can be found in this bug report

like image 148
Aakash Avatar answered Jan 22 '26 15:01

Aakash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!