Heroku error: Cannot find module webpack

This is more of a trouble shoot answer, but this issue generally arises with one of two issues:

  1. webpack is globally installed (at some point you did npm install webpack -g)
  2. webpack is installed as a devDependency.

If you are running a server that require's in webpack, you're going to install it as a dependency.

If you're not doing any serverside middleware, then setting webpack as a devDependency is generally what you want.

Tags:

Heroku

Node.Js