Yarn: Failing build on Heroku with 1.0.0

Created on 6 Sep 2017  路  11Comments  路  Source: yarnpkg/yarn

Getting an error on Heroku with the build failing when trying to build the "bcrypt": "^1.0.2", package:

EROFS: read-only file system, access '/usr/local/bin'".

Reverting to yarn 0.27.5 fixes the issue.

cat-bug

Most helpful comment

I've seen the same issue on Heroku using the create-react-app-buildpack. I filed an issue with them here before seeing this. Good luck with your fix 馃憣

All 11 comments

Same issue:

error An unexpected error occurred: "/tmp/build_5637271db7eb34ca37f6b66b57a15943/node_modules/uglifyjs-webpack-plugin: EROFS: read-only file system, access '/usr/local/bin'".

Reverting to yarn 0.28.4 fixes it.

Thanks a lot for the reports!

I think the culprit is #3721. That said I don't know why we are bumping into this. Do you think we can craft a scenario so we can reproduce it locally?

Right now, it should be easy to work around this via the --prefix option.

Aha! I think we just need to handle err.code === 'EROFS' at https://github.com/yarnpkg/yarn/pull/3721/files#diff-cebc41615330398e66d604a4a42bcd0eR96

What do you think @arcanis?

Yep sounds good - another option is to reuse the same logic than the one we use for the cache folder fallback, possibly moving it inside an utility function, findAcceptableDirectory or something.

Consolidating the logic would be nice, that said this logic seems a bit more complicated. Also, you already know my preference for not creating temporary files to check write-ability :D

Sounds like you've got this in hand; but more info in case it's helpful:

  • I get this with uglifyjs-webpack-plugin and gifsicle
  • running bash on an older ([email protected]) image and then upgrading yarn and installing uglifyjs-webpack-plugin and changing into it and running yarn build results in the same /usr/local/bin EROFS error
  • just running yarn in the root seems to bail out halfway through the final build messages:

screenshot 2017-09-06 10 08 12

(The newlines above were output by yarn, not by me.)

just running yarn in the root seems to bail out halfway through the final build messages:

This one is quite odd and I'm not sure if it is related to this bug. I'm waiting for TravisCI to give me the green light to merge the fix. After that nightly, if you encounter this, please file a new issue and we'll look into it.

I've seen the same issue on Heroku using the create-react-app-buildpack. I filed an issue with them here before seeing this. Good luck with your fix 馃憣

Heroku worked-around this issue on their end by not defaulting to 1.0.0.

Yeah I was wondering about that. They use "latest" in their build pack if you don't specify it in your engines, which would of course skip happily between (potentially breaking) major versions.

Was this page helpful?
0 / 5 - 0 ratings