Skip to content
Discussion options

You must be logged in to vote

Hi,

This example makes use of an escape-hatch, https://nextjs.org/docs/messages/edge-dynamic-code-evaluation, which you can find in the middleware file itself.

  unstable_allowDynamic: [
    '**/node_modules/.pnpm/lodash@*/node_modules/lodash/lodash.js',
    '**/node_modules/.pnpm/reflect-metadata@*/node_modules/reflect-metadata/Reflect.js',
  ],

The quirk is that, the code right now, is made to work with pnpm, so you, can do pnpm i and then pnpm run build, and that'll work, or you can edit that unstable_allowDynamic to work with npm instead:

  unstable_allowDynamic: [
    '**/n…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@rafalotufo
Comment options

@icyJoseph
Comment options

@icyJoseph
Comment options

@rafalotufo
Comment options

Answer selected by rafalotufo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants