How to manage Error R14 (Memory quota exceeded) wth Next.js and Heroku?

Viewed 735

I got this error:

heroku[web.1]: Error R14 (Memory quota exceeded)

My Next.js package.json looks like this:

  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start -p $PORT"
  },

My free plan can use 512 MB of memory.

Found this in docs https://devcenter.heroku.com/articles/node-memory-use

web: node --optimize_for_size --max_old_space_size=920 server.js

But I do not know where to write. My package.json has a different format.

0 Answers
Related