Skip to content

Rails API with Create-React-App on Heroku #1358

Closed
@vldsoar

Description

@vldsoar

Original post: http://stackoverflow.com/questions/39774143/rails-api-with-create-react-app-on-heroku-npm-command-not-found

I created Rails API backend app and inside the app in a folder client I created create-react-app for my frontend. It works well on my local machine but does not work on heroku with an error:

npm: command not found

This is the structure of the app:

rails-app

  • app
    • controller
    • model
    • ...
  • client
    • package.json
    • index.jsx
    • ...
  • config
  • db
  • ...
  • Procfile

Inside Procfile I have:

web: cd client && npm start
api: bundle exec rails s -p 3001

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions