Skip to content

Allow extensions to use deno std lib offline #877

Description

@kylewillmon

Any extension that uses the deno std library will always fail to run if the user is not connected to the internet.

This means, for example, that while npm init can be run offline, phylum npm init cannot:

❯ phylum npm init
❗ Error: error sending request for url (https://deno.land/std@0.150.0/fmt/colors.ts): error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known

Caused by:
    0: error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known
    1: dns error: failed to lookup address information: nodename nor servname provided, or not known
    2: failed to lookup address information: nodename nor servname provided, or not known

The Phylum behavior here is also different from the deno CLI, which makes heavy use of a cache to avoid unnecessary network access.

Of course, most Phylum extensions are written with an online usage in mind. And a simple workaround for this is to vendor or avoid these dependencies if offline usage is required. But this is still a limitation worth noting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestextensionsPhylum CLI extensionslow priorityShould be handled as time permits

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions