> For the complete documentation index, see [llms.txt](https://hatchbox.gitbook.io/hatchbox/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hatchbox.gitbook.io/hatchbox/apps/react-on-rails.md).

# 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.&#x20;
