Open
Description
Describe the bug
Right after tsp init
with empty project that only, npx tsp compile .
fails.
Emitter "@typespec/http-client-csharp" crashed! This is a bug.
Please file an issue at https://github.com/Microsoft/typespec/issues
Error: Root client not found
at getRootApiVersions (file:///C:/github/typespec-e2e-demo/sandbox/junk/node_modules/@typespec/http-client-csharp/dist/emitter/lib/client-model-builder.js:130:15)
at createModel (file:///C:/github/typespec-e2e-demo/sandbox/junk/node_modules/@typespec/http-client-csharp/dist/emitter/lib/client-model-builder.js:23:11)
at Object.$onEmit [as emitFunction] (file:///C:/github/typespec-e2e-demo/sandbox/junk/node_modules/@typespec/http-client-csharp/dist/emitter/emitter.js:44:22)
at async runEmitter (file:///C:/github/typespec-e2e-demo/sandbox/junk/node_modules/@typespec/compiler/dist/src/core/program.js:366:13)
at async compile (file:///C:/github/typespec-e2e-demo/sandbox/junk/node_modules/@typespec/compiler/dist/src/core/program.js:123:9)
at async compileOnce (file:///C:/github/typespec-e2e-demo/sandbox/junk/node_modules/@typespec/compiler/dist/src/core/cli/actions/compile/compile.js:36:25)
at async compileAction (file:///C:/github/typespec-e2e-demo/sandbox/junk/node_modules/@typespec/compiler/dist/src/core/cli/actions/compile/compile.js:19:9)
main.tsp only contains following:
import "@typespec/http";
import "@typespec/rest";
import "@typespec/openapi3";
Reproduction
In E2E repo,
cd sandbox
md [project] && cd [project]
npx tsp init ../../tsptemplate.json
npm install
npx tsp compile .
Checklist
- Follow our Code of Conduct
- Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.