Skip to content

Uncaught ReferenceError: require is not defined #774

@gURLmeetsCode

Description

@gURLmeetsCode

Help us help you! Please choose one:

  • My app crashes with react-rails, so I've included the stack trace and the exact steps which make it crash.
  • My app doesn't crash, but I'm getting unexpected behavior. So, I've described the unexpected behavior and suggested a new behavior.
  • I'm trying to use react-rails with another library, but I'm having trouble. I've described my JavaScript management setup (eg, Sprockets, Webpack...), how I'm trying to use this other library, and why it's not working.
  • I have another issue to discuss.

My project is currently set up with Rails 5, Webpacker and React-Rails and when I tried to render my react component I got the following error, "Uncaught ReferenceError: require is not defined". I am assuming this is an issue with the Webpack configuration. Is there someone that help determine the cause of this error and how to fix it? -- Thanks!

Link to repo: repo

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