frullah / react_on_rails_auto_load_error

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reproducing react_on_rails packs generation error

react_on_rails packs generation command will crash if the public server bundle is not present

Errno::ENOENT: No such file or directory @ rb_sysopen - .../public/packs/server-bundle.js

so, we should create an empty public server bundle first

mkdir -p public/packs
touch public/packs/server-bundle.js

Then, we can generate react_on_rails packs

rake react_on_rails:generate_packs

and compile javascript assets with shakapacker

bin/webpacker

About


Languages

Language:Ruby 54.9%Language:JavaScript 30.3%Language:HTML 14.0%Language:Shell 0.6%Language:CSS 0.2%