Experiencing issues deploying your node based web application on Heroku?
Have you gotten an error that looks similar to this one?
You're not the only one. Luckily, I've done the hair pulling for the both of us, so you'll be back in business in no time.
To prevent this error from disrupting your build, simply update your package.json file to mark fsevents as an optional dependency.
Why does this work?
Mac users frequently use fsevents to assist with local development, especially for hot-reloading and automatic code reloading.
Because fsevents is only meant to be installed on MacOS, listing it in your package.json will only present issues once you attempt to deploy your application to Heroku. Because Heroku attempts to build your application on a Linux based system, you'll encounter the above error, which will stop the build.
By listing fsevents as an optional dependency, the Heroku build process understands it can continue with your build even when the installation of this package fails.