Replies: 4 comments 1 reply
-
It tries to load For the yarn pnp part I am not sure, I am not familiar at all with it, how does it work? Could you make a repo with a repro so we can investigate how to support that. |
Beta Was this translation helpful? Give feedback.
-
Fell off on this thread - adding to it, hoping I can find a conclusion as I hack a bit - This one ought work on start up, from
But still seeing an issue:
This one is not as surprising, the VS Code Generate OpenAPI tool - needs to know to run
|
Beta Was this translation helpful? Give feedback.
-
For a simple yarn reproduction, this ought to work:
The typespec compiler one-way-or-another is escaping the module resolution process. I can try and track that down - as I see there is normal enough code for trying to use node module resolution - it's just missing it somewhere.
It's an optionalish runtime dependency - this code is a bit odd:
By calling it out as a dependency, and using yarn pnpify to handle the more stubborn bypass on module resolution, things compile.
I suspect a tweak here and there would allow |
Beta Was this translation helpful? Give feedback.
-
Here's a cross-link / note on custom yarn pnp resolvers - I don't think that's needed here, but I do think the code may show where there was a miss on calling the node resolver chain. Typespec is working absolutely wonderfully for us with AWS lambda functions. Absolute dream. Just a few work-arounds with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Related to the question of why there is a
tsp install
in the first place -- I am trying to boot up with a clean yarn pnp workspace - which is a bit of a challenge with the current typespec ecosystem as it seems to lean into using "node_modules" heavily for extensions.For the vs code extension, in
settings.json
file can be pointed to an unplugged compiler, e.g.:Overall though, simply running
yarn tsp
does not seem enough to maintain the pnp resolver:Note source-map-support is in the dev dependencies, so that may be a hint as to something going strange in the loader.
Similarly, or from a different strategy, we can quickly reproduce a sad time with yarn in:
That stated, this appears to work:
That's using
@yarnpkg/pnpify
and whether or not it's needed, I added to my.yarnrc.yml
:Beta Was this translation helpful? Give feedback.
All reactions