Open M4RC3L05 opened 1 week ago
This behavior is not only on compile, i have other project where i am trying to build a docker image that cached the deps before copying the source code, where it gets a similar error when doing a deno run --cached-only
FROM docker.io/denoland/deno:alpine-2.0.0
RUN mkdir /app
RUN chown -R deno:deno /app
USER deno
WORKDIR /app
COPY --chown=deno:deno deno.json deno.lock .
RUN deno install --node-modules-dir
RUN deno eval "import '@db/sqlite'"
COPY --chown=deno:deno . .
RUN mkdir /app/data
VOLUME [ "/app/data" ]
EXPOSE 4321 4322
when running i get:
error: Specifier not found in cache: "https://jsr.io/@hono/hono/4.6.2/src/jsx/jsx-runtime.ts", --cached-only is specified.
at file:///app/src/apps/web/app.tsx:1:1
heres the deno.json
{
...
"compilerOptions": {
"jsx": "precompile",
"jsxImportSource": "@hono/hono/jsx"
},
"lock": {
"frozen": true
},
"imports": {
"@hono/hono": "jsr:@hono/hono@4.6.2",
...
}
}
Probably the real error behind my problem https://github.com/denoland/std/issues/6108
@dsherret please take a look
Just tried with deno v2.0.1 and the error i get is a bit different, but still, do not work with --cached-only flag:
deno install
deno compile --cached-only main.ts
error: JSR package manifest for '@std/yaml' failed to load. Specifier not found in cache: "https://jsr.io/@std/yaml/meta.json", --cached-only is specified.
at file:///home/main/devs/the-office-quote/main.ts:1:23
Does it work if you do deno install -e main.ts
instead of deno install
?
Does it work if you do
deno install -e main.ts
instead ofdeno install
?
Doesn't work either in my case.
Can confirm it does not work to me either
rm -rf ~/.cache/deno && deno install -e main.ts && deno compile --cached-only main.ts
error: Specifier not found in cache: "https://jsr.io/@std/yaml/1.0.5/_type.ts", --cached-only is specified.
at https://jsr.io/@std/yaml/1.0.5/_loader_state.ts:40:37
Hi, Given the following
deno.json
fileI would expect that after a
deno install
, i would be able to use the deno commands using the--cached-only
flag. What happens is that if i dodeno install && deno compile main.ts
i get the following errorI am under the impression that
deno install
would download and cache all deps, but it happers that is misses some files?Running
deno install && deno compile main.ts
it dos work but i have to download the missing file but it seems weird that i cannot use the--cached-only
:deno 2.0.0 (stable, release, x86_64-unknown-linux-gnu) v8 12.9.202.13-rusty typescript 5.6.2