LogoLogo
  • Hatchbox Classic Support
  • Clusters
  • Providers
  • Servers
  • Apps
    • ActionCable
    • Background Workers
    • Backups
    • BitBucket
    • Cron Jobs
    • Deploy Scripts
    • Domains & DNS
    • ElasticSearch
    • File Uploads
    • Image Processing
    • Jekyll
    • Passenger
    • Postgres
    • Puma
    • Rails
    • Rake
    • React On Rails
    • Ruby Versions
    • Sitemaps
    • Sphinx
    • SSL
    • Webhooks & Auto-Deploy
    • Webpacker
  • Security
  • Support
  • Databases
    • Backup & Restore
Powered by GitBook
On this page
  1. Apps

React On Rails

How do I deploy a react_on_rails app to Hatchbox?

If you noticed your deployment crashed with a "webpack: not found" error, then you'll need to make two simple changes.

First, add the following to your `package.json` file:

"scripts": { 
  "postinstall": "cd client && yarn install" 
}

Add the following line to your app's Deploy Script just before the rake assets:precompile line.

rbenv exec bundle exec bin/yarn

Save your Deploy Script and your new deploy should successfully compile your assets.

react_on_rails clobbers the default Rails assets:precompile command which means the dependencies for your app are not installed automatically anymore.

PreviousRakeNextRuby Versions

Last updated 6 years ago