denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
98.05k stars 5.4k forks source link

Dyanmic import doesnt work #23003

Closed boutahlilsoufiane closed 5 months ago

boutahlilsoufiane commented 8 months ago

Hi Deno team, thanks for building Deno, when I called langchain module I got this:

Error: Failed to load mammoth. Please install it with eg. npm install mammoth. at _ (https://esm.sh/v135/langchain@0.1.6/denonext/document_loaders/fs/docx.js:201:1260)

Version: Deno 1.41.2

The buggy file: https://esm.sh/v135/langchain@0.1.6/denonext/document_loaders/fs/docx.js:201:1260 Line error => await import("/v135/mammoth@1.7.0/denonext/mammoth.mjs");

lucacasonato commented 5 months ago

You can import langchain with npm:langchain rather than using https://esm.sh.

This looks like an issue with https://esm.sh