Skip to content

deno does not handle missing shasum gracefully #27758

@wcygan

Description

@wcygan
Version: Deno 2.1.4

deno --version
deno 2.1.4 (stable, release, aarch64-apple-darwin)
v8 13.0.245.12-rusty
typescript 5.6.2

I am having trouble using buf.build as a registry

Based on these blog posts, it should be possible:

  1. https://deno.com/blog/deno-in-2024#built-in-performant-dependency-management
  2. https://deno.com/blog/v2.0#private-npm-registries

Steps to reproduce

Edit: I've created a minimal reproducible example that you can use for debugging & testing: https://github.com/wcygan/deno-npm-buf-test

Original response:

.npmrc:

@buf:registry=https://buf.build/gen/npm/v1/

Do deno install:

deno install npm:@buf/wcygan_flock.bufbuild_es
error: npm:@buf/wcygan_flock.bufbuild_es was not found.

Motivation

I would love to try out deno and fresh, but a key issue is preventing me from adopting them. I can't install my gRPC/ConnectRPC types from https://buf.build/wcygan/flock/sdks, which requires me to "Configure your package manager to add Buf as a registry"

I started a discussion on this #27749, but I think it may be a real issue, and unfortunately it makes Deno and Deno Fresh dead on arrival for me since I won't be able to communicate with my backend servers without these packages.

Maybe there is a workaround I am not aware of, or I am doing the installation incorrectly?

How this works in npm

Using npm, this is quite easy, and the instructions are stated on https://buf.build/wcygan/flock/sdks

npm config set @buf:registry https://buf.build/gen/npm/v1/
npm install @buf/wcygan_flock.bufbuild_es@latest
Image Image

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions