Skip to content
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

yarn --version triggers ENOENT error before first install #1894

Closed
akloeber opened this issue Nov 16, 2016 · 2 comments
Closed

yarn --version triggers ENOENT error before first install #1894

akloeber opened this issue Nov 16, 2016 · 2 comments

Comments

@akloeber
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When requesting the version of yarn after installation the following error is thrown:

root@vagrant-ubuntu-trusty-64:~# yarn --version
0.17.2
/usr/share/yarn/bin/yarn.js:47
      throw err;
      ^

Error: ENOENT: no such file or directory, open '/usr/local/share/.cache/yarn/.roadrunner.json'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.fs.writeFileSync (fs.js:1156:15)
    at /usr/share/yarn/node_modules/roadrunner/index.js:25:6
    at /usr/share/yarn/node_modules/roadrunner/index.js:12:12
    at emitOne (events.js:82:20)
    at process.emit (events.js:169:7)
    at processEmit [as emit] (/usr/share/yarn/node_modules/signal-exit/index.js:140:35)
    at process.exit (node.js:766:17)
    at Command.<anonymous> (/usr/share/yarn/node_modules/commander/index.js:825:13)

After installing any global module /usr/local/share/.cache/yarn/.roadrunner.json is present and yarn version gives the correct output:

root@vagrant-ubuntu-trusty-64:~# yarn global add pm2
...
root@vagrant-ubuntu-trusty-64:~# yarn --version
0.17.2

If the current behavior is a bug, please provide the steps to reproduce.

  • install via dpkg -i yarn_0.17.2_all.deb
  • run yarn --version

What is the expected behavior?
yarn should only print version number 0.17.2.

Please mention your node.js, yarn and operating system version.
node 4.6.2
yarn 0.17.2
Ubuntu 14.04.5 LTS

@lyushenko
Copy link

Having the same issue on MacOS with yarn 0.17.3 installed via npm.

@wyze
Copy link
Member

wyze commented Nov 17, 2016

Duplicate #1724.

@wyze wyze closed this as completed Nov 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants