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

.roadrunner.json error #1724

Closed
zeke opened this issue Nov 7, 2016 · 24 comments
Closed

.roadrunner.json error #1724

zeke opened this issue Nov 7, 2016 · 24 comments
Assignees
Labels

Comments

@zeke
Copy link
Contributor

zeke commented Nov 7, 2016

👋

I just installed a nightly build of yarn to get all the latest goodies. Following the instructions at #1474 and yarnpkg/website#245:

wget https://yarnpkg.com/install.sh
chmod +x install.sh
install.sh --nightly

The install script told me to remove ~/.yarn so I did, then re-ran it. Now I get this error when I run yarn:

❯ yarn -V
0.17.0-20161107.1501
/Users/zeke/.yarn/bin/yarn.js:47
      throw err;
      ^

Error: ENOENT: no such file or directory, open '/Users/zeke/Library/Caches/Yarn/.roadrunner.json'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.writeFileSync (fs.js:1333:33)
    at /Users/zeke/.yarn/node_modules/roadrunner/index.js:25:6
    at /Users/zeke/.yarn/node_modules/roadrunner/index.js:12:12
    at emitOne (events.js:101:20)
    at process.emit (events.js:188:7)
    at processEmit [as emit] (/Users/zeke/.yarn/node_modules/signal-exit/index.js:140:35)
    at process.exit (internal/process.js:146:15)
    at Command.<anonymous> (/Users/zeke/.yarn/node_modules/commander/index.js:825:13)

Once I've actually used yarn to add a dep somewhere, this error goes away, pesumably because this directory is created as a side-effect of the installation process?

@Daniel15
Copy link
Member

Daniel15 commented Nov 7, 2016

I suspect this is due to #1638. @kittens

@Daniel15 Daniel15 assigned sebmck and unassigned Daniel15 Nov 7, 2016
@develar
Copy link

develar commented Nov 9, 2016

workaround: mkdir ~/Library/Caches/Yarn

@Daniel15 Daniel15 changed the title .roadrunner.json error after installing nightly build .roadrunner.json error Nov 13, 2016
@sapegin
Copy link
Contributor

sapegin commented Nov 14, 2016

I have the same on Travis CI with a stable version (npm install -g yarn).

@jbruni
Copy link

jbruni commented Nov 14, 2016

It just happened to me using Ubuntu inside Virtual Box (host is Windows 10).
As suggested above, I installed any package using yarn add and the error goes away.

@reederz
Copy link

reederz commented Nov 14, 2016

Same here on Arch Linux and [email protected]

@shaneog
Copy link

shaneog commented Nov 14, 2016

Same here when installed on CI via curl/bash:

curl -o- -L https://yarnpkg.com/install.sh | bash

results in:

$ curl -o- -L https://yarnpkg.com/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    94  100    94    0     0    637      0 --:--:-- --:--:-- --:--:--   639
100  3531  100  3531    0     0  22083      0 --:--:-- --:--:-- --:--:-- 22083
Installing Yarn!
> Downloading tarball...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    92  100    92    0     0    665      0 --:--:-- --:--:-- --:--:--   666
  0     0    0   595    0     0   3105      0 --:--:-- --:--:-- --:--:--  3105
100 3531k  100 3531k    0     0  13.3M      0 --:--:-- --:--:-- --:--:-- 56.5M
> Extracting to ~/.yarn...
> Adding to $PATH...
> We've added the following to your /home/ubuntu/.bashrc
> If this isn't the profile of your current shell then please add the following to your correct profile:

export PATH="$HOME/.yarn/bin:$PATH"

/home/ubuntu/.yarn/bin/yarn.js:47
      throw err;
      ^

Error: ENOENT: no such file or directory, open '/home/ubuntu/.cache/yarn/.roadrunner.json'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.writeFileSync (fs.js:1333:33)
    at /home/ubuntu/.yarn/node_modules/roadrunner/index.js:25:6
    at /home/ubuntu/.yarn/node_modules/roadrunner/index.js:12:12
    at emitOne (events.js:101:20)
    at process.emit (events.js:188:7)
    at processEmit [as emit] (/home/ubuntu/.yarn/node_modules/signal-exit/index.js:140:35)
    at process.exit (internal/process.js:146:15)
    at Command.<anonymous> (/home/ubuntu/.yarn/node_modules/commander/index.js:825:13)
> Yarn was installed, but doesn't seem to be working :(.

@amasad
Copy link

amasad commented Nov 14, 2016

Hitting this issue on heroku too. (ref heroku/heroku-buildpack-nodejs#337 (comment))

@Gpx
Copy link

Gpx commented Nov 14, 2016

A temporary solution is to rollback to 0.16.1

@imontiel
Copy link

Having the same problem on CircleCI.

jviide added a commit to HowNetWorks/uriteller that referenced this issue Nov 14, 2016
@Daniel15
Copy link
Member

If you're on Ubuntu or Debian, you can temporarily roll back by doing:

wget https://yarnpkg.com/downloads/0.16.1/yarn_0.16.1_all.deb
sudo dpkg -i yarn_0.16.1_all.deb

I'll work on keeping multiple versions of Yarn in the Debian repo to make it easier in the future.

Similarly, if you're using a tarball, you can download the tarball from https://yarnpkg.com/downloads/0.16.1/yarn-v0.16.1.tar.gz to get 0.16.1.

@bbak
Copy link

bbak commented Nov 15, 2016

On Debian, when upgrading a globally installed yarn 0.16.1 through npm, the path is: '/usr/local/share/.cache/yarn/.roadrunner.json'. There's no cache or .cache in /usr/local/share; however, the directory '/usr/local/share/.yarn' exists and is empty.

@imontiel
Copy link

imontiel commented Nov 15, 2016

Ended up just doing npm install -g [email protected]. The rest of my app's versions are locked down, I suppose it makes sense to lock yarn as well.

@Daniel15
Copy link
Member

I'm going to work on adding a --version flag to the installer, and also having multiple versions in the Debian repo. That'll allow you to more easily lock down the version of Yarn.

@Daniel15
Copy link
Member

Daniel15 commented Nov 16, 2016

I've updated the Debian repo to contain all releases, not just the latest one. I think we'll start suggesting locking the Yarn version for CI environments (such as CircleCI, TravisCI, etc). You can update the apt-get line in your build script to something like this:

sudo apt-get install -yy yarn=0.16.1-1

Which will always install 0.16.1, even if a newer version comes out. This should prevent your builds from breaking due to new Yarn releases! 😄

You can run apt-cache policy yarn to see a list of all available versions:

yarn:
  Installed: 0.16.1-1
  Candidate: 0.16.1-1
  Version table:
 *** 0.16.1-1 500
        500 http://dl.yarnpkg.com/debian stable/main amd64 Packages
        100 /var/lib/dpkg/status
     0.16.0-1 500
        500 http://dl.yarnpkg.com/debian stable/main amd64 Packages
     0.15.0-1 500
        500 http://dl.yarnpkg.com/debian stable/main amd64 Packages

@Zhomart
Copy link

Zhomart commented Nov 17, 2016

Yarn creates MODULE_CACHE_DIRECTORY/.roadrunner.json, where MODULE_CACHE_DIRECTORY can be ~/.cache or ~/Library/Caches/Yarn depending on the system.

I think either yarn should use temporary directory for roadrunner or read config file to get cache directory.
I'm having the same problem while setting --cache-folder, e.g.

$ yarn install --cache-folder ./tmp/yarn-cache

@msmfsd
Copy link

msmfsd commented Nov 17, 2016

Mac OSX fix: mkdir -p ~/Library/Caches/Yarn

@wellyshen
Copy link

wellyshen commented Nov 17, 2016

Hi @msmfsd How to fix it, if the yarn was installed through nvm npm -g -i yarn?

@ghost
Copy link

ghost commented Nov 17, 2016

@wellyshen nvm clear-cache

@wyze
Copy link
Member

wyze commented Nov 17, 2016

Fixed via #1902.

@wyze wyze closed this as completed Nov 17, 2016
@wellyshen
Copy link

wellyshen commented Nov 17, 2016

Hi @wyze The problem still exist, I install the yarn through nvm (npm -i -g yarn) and I also clear cache as @MoeSattler mentioned before running yarn --version, and the error occurs:

2016-11-17 11 09 16

Now, I install back to the v0.16.1, and it works... I wish the v0.17 version could also works for me

@wyze
Copy link
Member

wyze commented Nov 17, 2016

There hasn't been a release with this fix included yet. See #1859 to follow along our progress 0.17.x.

@wellyshen
Copy link

@wyze OK, thanks. I will waiting for the new version

@sejoker
Copy link

sejoker commented Nov 17, 2016

@wellyshen 0.17.4 includes exactly the fix for #1724

@wellyshen
Copy link

@sejoker COOL I have verified, it fixed, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests