reactjs/react-rails

Read-only file system @ dir_s_mkdir - /components

pehrlich2 opened this issue · 1 comments

Hello! Dropping this here at least for any other googlers.

Trying to follow the readme steps, I get a failure at rails generate react:install:

/Users/peterehrlich/.rbenv/versions/3.2.0/lib/ruby/3.2.0/fileutils.rb:406:in `mkdir': Read-only file system @ dir_s_mkdir - /components (Errno::EROFS)
<snip>
from /Users/peterehrlich/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.4.2/lib/rails/generators.rb:263:in `invoke'

This appears to be due to the default webpacker.yml setting which defaults to /:

# You can have a subdirectory of the source_path, like 'packs' (recommended).
  # Alternatively, you can use '/' to use the whole source_path directory.
  source_entry_path: packs

Setting this to packs seems to resolve the issue.

Hi
This issue was reported and answered before.

This issue will be fixed in the next release. The fix is available on the master branch but it is not released yet.