Skip to content

nextjs usage fails in middleware functions because of dynamic functions #29

@saurabhnemade

Description

@saurabhnemade

@jfromaniello

NextJS builds fails to use it in middleware function..
Not sure if updating the lodash clonedeep will resolve this.
Perhaps clonedeep can be now replaced with structuredClone https://developer.mozilla.org/en-US/docs/Web/API/structuredClone

../../node_modules/.pnpm/[email protected]/node_modules/lodash.clonedeep/index.js
Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime 
Learn More: https://nextjs.org/docs/messages/edge-dynamic-code-evaluation

Import trace for requested module:
../../node_modules/.pnpm/[email protected]/node_modules/lodash.clonedeep/index.js
../../node_modules/.pnpm/[email protected]/node_modules/lru-memoizer/lib/async.js
../../node_modules/.pnpm/[email protected]/node_modules/lru-memoizer/lib/index.js
../../node_modules/.pnpm/[email protected]/node_modules/jwks-rsa/src/wrappers/cache.js
../../node_modules/.pnpm/[email protected]/node_modules/jwks-rsa/src/wrappers/index.js
../../node_modules/.pnpm/[email protected]/node_modules/jwks-rsa/src/JwksClient.js
../../node_modules/.pnpm/[email protected]/node_modules/jwks-rsa/src/index.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions