Error importing npm module in Edge Function

I’m trying to use langgraph in an Edge Function and I need this module @langchain/langgraph/prebuilt.

It works locally with netlify dev but when trying to build in prod wiht netlify deploy --build it fails with error:

Error message
  There was an error when loading the '@langchain/langgraph/prebuilt' npm module. Support for npm modules in edge functions is an experimental feature. Refer to https://ntl.fyi/edge-functions-npm for more information.

netlify CLI version 17.38.0

Are you using import maps or loading it via esm.sh? If not, have you tried that?

Can you please show me an example of both ?

esm.sh:

import something from 'https://esm.sh/@langchain/langgraph@0.2.33/prebuilt'

Import Maps do the same with extra steps: Edge Functions API | Netlify Docs

yes esm.sh works thanks

thanks for confirming your issue was resolved