#Module not found: Can't resolve 'fs'

1 messages · Page 1 of 1 (latest)

noble sonnet
#

I am trying to use deepgram in my NextJS project, below is the code and the error i am seeing

const { result, error } = await deepgram.listen.prerecorded.transcribeUrl(
    {
      url: audioUrl
    },
    {
      model: "nova",
      language: 'en',
      punctuate: 'true',
      smart_format: 'true',
      filler_words: 'false',
    }
  );
Module not found: Can't resolve 'fs'```

I tried to find solutions online, the solution i found was to add below in package.json, but this futher leads to more erros for 'tls' etc and eventually createClient fails

"browser": {
"fs": false,
"os": false,
"path": false
}

hexed agateBOT
#

Thanks for asking your question. Please be sure to reply with as much detail as possible so we can assist you efficiently. Such as:

  • Provide the request_id if you've a question about a transcription response.
  • The options you used or the api.deepgram.com URL you sent your request to, including parameters.
  • Any code snippets you can include.
  • Any audio you can include, or if you can't share it here please email it to us at [email protected] and provide a link to this thread.
crude pike
#

Hi Khalid, can you provide how you're using this? Is it in a client component or a route?