-3

I'm trying to create a simple example for a problem I have in NextJS.

The problem is that it encountered an error, showed Internal Server Error and now I'm stuck at how to make it work.

I retried many times. But each time somewhere it encounters this error and never recovers.

Here's an example:

https://stackblitz.com/edit/nextjs-9zbx4x?file=cache.js

How can I fix this error?

Jatin Parmar
  • 2,759
  • 5
  • 20
  • 31
Big boy
  • 1,113
  • 2
  • 8
  • 23

1 Answers1

2

As it states on console error:

Error: [BABEL] /home/projects/nextjs-9zbx4x/node_modules/next/dist/client/dev/amp-dev.js: Cannot find module 'babel-plugin-macros'

You need to add babel-plugin-macros dependency in dependencies section of your package.json like this:

"babel-plugin-macros": "3.1.0",

You can take a look at this forked stackblitz for the live working update with babel-plugin-macros dependency.

Ahmet Emre Kilinc
  • 5,489
  • 12
  • 30
  • 42