reactjs/react-rails

rails generate react:install try to create the files and directories to "/"

RadLobster opened this issue · 3 comments

Steps to reproduce

do the tutorial till the run of the generator:
react generate react:install

Expected behavior

the generator should create the following arbo:
app/javascript/components/
app/javascript/packs/application.js
app/javascript/packs/server_rendering.js

Actual behavior

the generator tries to create the file to the root directory '/' so it fails because of permission violation

System configuration

  • Shakapacker or Sprockets version:6.5.0
  • React-Rails version:none
  • React_UJS version:none
  • Rails version:7.0.4
  • Ruby version:3.1.2

at the step of launching the rails generate react:install it seems like the generation of the file tries to operate in the root directory of the system '/' instead of the current application root directory

This was a know issue and will be fixed in the upcoming version.

Meanwhile please manually edit config/webpacker.yml and change source_entry_path from / to packs.

Please confirm the fix.

the fix does it.

thx for the reactivity it's well appreciated

FYI, @ahangarha is on the ShakaCode team.

We should have a new release out soon that addresses this issue.

If anybody wants help with upgrading, please contact me at justin@shakacode.com.