denoland / denoland/dnt

no exported member named 'HttpConn'. Did you mean 'TcpConn'

Open
#316 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.3k
Forks
49
PR merge metrics
No merged PRs in 30d

Description

I'm seeing a number of errors related to HttpConn.

Eg:
```
src/deps/deno.land/std@0.192.0/http/server.ts:63:38 - error TS2724: '"/dev/xrpc/npm-dist/node_modules/@deno/shim-deno/dist/index".Deno' has no exported member named 'HttpConn'. Did you mean 'TcpConn'?

63 #httpConnections: Set = new Set();
```

```
import { build, emptyDir } from "https://deno.land/x/dnt/mod.ts";

await emptyDir("../npm-dist");

await build({
entryPoints: ["./mod.ts"],
outDir: "./npm-dist",
shims: {
// see JS docs for overview and more options
deno: true,
timers: true,
undici: true,
domException: true,
custom: [{
package: { name: "stream/web" },
globalNames: ['TransformStream']
}]
},
package: {
// package.json properties
name: "@melbourne2991/xrpc",
version: Deno.args[0],
description: "Simple RPC",
license: "MIT",
repository: {
type: "git",
url: "git+https://github.com/meloburne2991/xrpc.git",
},
bugs: {
url: "https://github.com/meloburne2991/xrpc/issues",
},
devDependencies: {
"@types/node": "^16",
},
},
scriptModule: false,
compilerOptions: {
importHelpers: true,
lib: ["ES2021", "DOM"],
target: "ES2021",
},
postBuild() {
// steps to run after building and before running the tests
// Deno.copyFileSync("LICENSE", "npm/LICENSE");
Deno.copyFileSync("README.md", "npm-dist/README.md");
},
});
```

deps:

```
export { describe, it } from "https://deno.land/std@0.192.0/testing/bdd.ts"
export { assertEquals } from "https://deno.land/std@0.192.0/testing/asserts.ts"
export { Server } from "https://deno.land/std@0.192.0/http/server.ts"
export { spy } from "https://deno.land/std@0.192.0/testing/mock.ts"
```

Version:
```
deno 1.33.4 (release, aarch64-apple-darwin)
v8 11.4.183.2
typescript 5.0.4
```

Contributor guide

Open the contributing guide

Research direction

Start with the provided dnt build configuration and the generated dependency at src/deps/deno.land/std@0.192.0/http/server.ts, then inspect the Deno shim export surface used during npm packaging. Reproduce the TypeScript error with the shown dependencies and confirm completion when the build no longer reports the missing HttpConn export.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.