Can't use @std/dotenv/load
when using deno install
and vendoring (no file matching entrypoint in vendor directory)
#6108
Labels
Describe the bug
I wanted to make my project to use
deno install
and vendoring, but I encountered a strange problem, namely that when setting"vendor": true
in thedeno.json
file and doingdeno install
, the dependencies are installed (both from NPM and jsr.io) but dotenv is missing the load entrypoint.Steps to Reproduce
deno.json
:main.ts
:Run:
IDE/compile/run error on the line with the dotenv import. If you don't pass the
--cached-only
flag to the run/compile command it will redownload automatically and succeed (and the error will be gone in IDE).Files in the vendor directory:
The
@std/dotenv
package (on this specific version) seems to export the load.ts file, which is present in the repo. But it doesn't appear in the file tree.I noticed something strange, when erasing the node_modules and vendor folders and running
deno cache main.ts
, the module is installed correctly including the load entrypoint (no more errors, everything works). But then why are the other entrypoints installed?I don't really know if the error is in the package config or the
deno install
implementation but it's rather annoying since this command will allow painless layer caching in Docker.Expected behavior
Same behavior when using
deno install
anddeno cache main.ts
if all dependencies are listed indeno.json
.Environment
The text was updated successfully, but these errors were encountered: