Closed cincauhangus closed 1 month ago
Hey I tried to reproduce this issue in a basic yarn 4.5.0 workspace and couldn't could you make a basic repo where this reproduce? And can you share which version of yarn + what options you are using?
I've encountered this error with npm workspaces as well.
Hey I tried to reproduce this issue in a basic yarn 4.5.0 workspace and couldn't could you make a basic repo where this reproduce? And can you share which version of yarn + what options you are using?
Apologies @timotheeguerin - I am running on yarn 3.5.x, node 20.11.0, Windows 11
Repo: https://github.com/cincauhangus/issue-typespec-4509
When running on typespec v0.60.x:
When running on typespec v0.54.x:
Thanks for the repro, i do get the error now as well with 0.60.0, for the 0.54, I'll assume that that part was fixed or the error is just showing in a different way.
What is intresting is it only seems to affect finding the emitter
ok so I found the issue, the problem is that openapi3 library request a dependency on @typespec/openapi
and @typespec/versioning
but those were not installed.
If you add this to your package.json it works
"@typespec/openapi": "^0.60.0",
"@typespec/versioning": "^0.60.0"
what I don't really get is why yarn just silently ignore those not being present
Edit: nvm it does
Unfortunately it doesn't looks like yarn can install those automatically
ok so I found the issue, the problem is that openapi3 library request a dependency on
@typespec/openapi
and@typespec/versioning
but those were not installed.If you add this to your package.json it works
"@typespec/openapi": "^0.60.0", "@typespec/versioning": "^0.60.0"
what I don't really get is why yarn just silently ignore those not being present
Edit: nvm it does
Installing both of these fixed the issue, thank you!
ok so I found the issue, the problem is that openapi3 library request a dependency on
@typespec/openapi
and@typespec/versioning
but those were not installed.If you add this to your package.json it works
"@typespec/openapi": "^0.60.0", "@typespec/versioning": "^0.60.0"
what I don't really get is why yarn just silently ignore those not being present
Edit: nvm it does
Can confirm that fixed the issue in both v0.54 and v0.60. Thanks for the support!
Do you want to keep this issue open, @timotheeguerin ?
Yeah, i think there is a few takeaway. Need docs for yarn, better error in that case that shows the root error. Find way to validate peer deps are actually installed.
Describe the bug
I'm currently trying to migrate a standalone typespec package into a monorepo and I'm having troubles trying to run
yarn tsp compile
after installation.Note: This error does not appear when running as a standalone package.
Errors when running
tsp compile .
Issue stems from this library file in the @typespec/openapi3 package:
Reproduction
tsp compile .
in the new repo.Checklist