Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow extensions to use deno std lib offline #877

Open
kylewillmon opened this issue Dec 13, 2022 · 0 comments
Open

Allow extensions to use deno std lib offline #877

kylewillmon opened this issue Dec 13, 2022 · 0 comments
Labels
enhancement New feature or request extensions Phylum CLI extensions low priority Should be handled as time permits

Comments

@kylewillmon
Copy link
Contributor

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/[email protected]/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.

@kylewillmon kylewillmon added enhancement New feature or request low priority Should be handled as time permits labels Dec 13, 2022
@kylewillmon kylewillmon added the extensions Phylum CLI extensions label Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request extensions Phylum CLI extensions low priority Should be handled as time permits
Projects
None yet
Development

No branches or pull requests

1 participant