kinghat
kinghat5w ago

unsupported lockfile

in my gh action setup deno env using rc 2:
- name: Setup Deno environment
uses: denoland/setup-deno@v1
with:
deno-version: 2.0.0-rc.1
- name: Setup Deno environment
uses: denoland/setup-deno@v1
with:
deno-version: 2.0.0-rc.1
im getting the error on build that my lockfile is unsupported:
Run deno task build error: Unsupported lockfile version '4'. Try upgrading Deno or recreating the lockfile at '/home/runner/work/kinghat/kinghat/deno.lock'. Error: Process completed with exit code 1.
8 Replies
bartlomieju
bartlomieju5w ago
Cc @dsherret this seems unexpected. Any idea?
kinghat
kinghat5w ago
its been a min since ive used deno so it may just be something dumb:
No description
kinghat
kinghat5w ago
i found this: https://github.com/denoland/deno/issues/25144 and tossed DENO_FUTURE=1 in front of my build script but same error:
"tasks": {
"lume": "echo \"import 'lume/cli.ts'\" | deno run -A -",
"build": "DENO_FUTURE=1 deno task lume",
"serve": "deno task lume -s",
"cms": "deno task lume cms"
},
"tasks": {
"lume": "echo \"import 'lume/cli.ts'\" | deno run -A -",
"build": "DENO_FUTURE=1 deno task lume",
"serve": "deno task lume -s",
"cms": "deno task lume cms"
},
GitHub
error: Unsupported lockfile version '4'. · Issue #25144 · denoland...
Version: Deno 1.46.0 It seems deno lint (and other deno subcommands) does not support lockfile version 4 or ignores DENO_FUTURE=1. Lockfile version 4 was introduced with #25059. ❯ deno task main Ta...
kinghat
kinghat5w ago
changed the deno setup env to canary as well but it looks like the action is still using stable:
- name: Setup Deno environment
uses: denoland/setup-deno@v1
with:
# deno-version: 2.0.0-rc.1
deno-version: canary
- name: Setup Deno environment
uses: denoland/setup-deno@v1
with:
# deno-version: 2.0.0-rc.1
deno-version: canary
Run denoland/setup-deno@v1 with: deno-version: v1.x
Going to install stable version 1.46.3. Downloading Deno from https://github.com/denoland/deno/releases/download/v1.46.3/deno-x86_64-unknown-linux-gnu.zip. /usr/bin/unzip -o -q /home/runner/work/_temp/fc2fe05e-2107-414e-a03a-002aeae2fac7 Cached Deno to /opt/hostedtoolcache/deno/1.46.3/x64. Installation complete.
KyleJune
KyleJune5w ago
Delete lock file. I think errors like that happen when switching from DENO_FUTURE being 1 to 0. Your build is running with it as 1, upgrading your lock file, then your other commands are running without it set, and it doesn't recognize or know how to handle the newer lock file format. Either run all commands with it set to 1 or run all with it set to 0. Or disable lock files.
kinghat
kinghat5w ago
ive been having this issue since before setting DENO_FUTURE though. and its still complaining about the v4 lockfile in editor as well.
bartlomieju
bartlomieju5w ago
Which Deno versions are you using locally?
kinghat
kinghat5w ago
its 2.0 rc1 in devcontainer