Open stefan-schweiger opened 1 week ago
That is a pity. The templates are a bit stale, will update them!
I believe this is an issue with node 22 test framework introducing a breaking change. This pr supposed to fix it but seems like is having some issues, will look into it https://github.com/microsoft/typespec/pull/3605/files
Describe the bug
When you initialize a new library as described here and try to run the tests it fails with
Error: Cannot find module '~/source/typespec-test/dist/test'
. Also overall the code produces by thetsp init --template library-ts
command is not very similar to the one described in the documentation. For example there is novitest
installed and no config files for it produced. And even when trying to adapt it to the code described in the docs it still does not work.I think it's important to have a working base template or example project how to create libraries and it's a pity that trying to extend typespec immediately throws such roadblocks in your way.
Environment:
TypeSpec compiler v0.57.0 macOS 14.5 npm 10.5.2 node 22.3.0
Reproduction
Checklist