Skip to content

Lockfile gets corrupted on empty package.json dependency #32113

@bartlomieju

Description

@bartlomieju

Version: Deno 2.6.8

package.json

{
    "dependencies": {
        "": "."
    }
}

a.js

import { it } from "jsr:@std/testing/bdd";
console.log('foo')
$ deno run a.js
foo
$ deno run a.js
error: Failed reading lockfile at '/Users/ib/dev/try_lockfile_corrupt/deno.lock'

Caused by:
    0: Failed deserializing. Lockfile may be corrupt
    1: Invalid workspace section: Invalid package requirement '@.'

Originally reported by @kevgeoleo

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctlyinstall

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions