-
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENOENT: no such file or directory, realpath #1730
Comments
This commit updates the implementation for resolving `.ts` files. Instead of registering the `ts-node` project only once, we now refrain from doing so since there might be multiple projects with different configurations. The current approach involves dynamically switching the implementation for registering and unregistering the project after the `.ts` file has been transpiled and resolved. This change addresses an issue where warnings were encountered when `ts-node` attempted to register with different configurations. The number of configurations is no longer a concern, as each time we need to read a `.ts` file, a new TS project is registered. This adjustment does not impact performance or other attributes because `ts-node` allows native project disabling. Part of the implementation has been adapted from what Nrwl Nx already has; we can find their implementation here: https://github.com/nrwl/nx/blob/master/packages/nx/src/plugins/js/utils/register.ts It's worth noting that their implementation is somewhat versatile, as it also supports SWC. Closes: #1197 Closes: #1213 Closes: #1730
This commit updates the implementation for resolving `.ts` files. Instead of registering the `ts-node` project only once, we now refrain from doing so since there might be multiple projects with different configurations. The current approach involves dynamically switching the implementation for registering and unregistering the project after the `.ts` file has been transpiled and resolved. This change addresses an issue where warnings were encountered when `ts-node` attempted to register with different configurations. The number of configurations is no longer a concern, as each time we need to read a `.ts` file, a new TS project is registered. This adjustment does not impact performance or other attributes because `ts-node` allows native project disabling. Part of the implementation has been adapted from what Nrwl Nx already has; we can find their implementation here: https://github.com/nrwl/nx/blob/master/packages/nx/src/plugins/js/utils/register.ts It's worth noting that their implementation is somewhat versatile, as it also supports SWC. Closes: #1197 Closes: #1213 Closes: #1730
Do you know what's the minimal requirement for Angular/TS here @muuvmuuv ? Trying to figure out if we can release such a change in a minor version without breaking everyone. |
I already tried to but its hard to say. We would need tests for that to check against lower semver ranges. But since it no longer works on my end between these and the previous version I would say this is the range. |
Would it make sense to grab that here after v18 release since TS version is now high enough? |
Absolutely, I'd say if anything it must be part of v18 release (since as part of breaking changes we can require minimal TS version). |
Yeah ofc. But I don't think I can write tests for that, Jest is kinda picky with mixed import syntax so it wont be ez.. maybe a custom test suite in shell-script with tsc? |
Just something I discovered developing in angular-builders is that "@lerna-lite/run" is missing in order to do something like: |
I think that the existing e2e tests for builders will implicitly cover the change (coz they depend on
We use |
Ok, this requires way more work, it does work in my szenario because my repo has type=module and other stuff set to newer settings, but it does not in here because a lot still requires cjs syntaxes. I guess every example and package must first be updated to be esm only or something like that but idk if that even works with Angular. I tried setting stuff to type=module but that comes with another error "Unknown file extension ".ts" and so on ^^ |
Just to make it clear: is it a bug or an enhancement? We have examples with both |
I remember that it was indeed a bug when I initially opened the issue but it seem to be disappeared at some point. Maybe TS had an update fixing it. Might check that out when v18 is out and look in detail. |
This commit updates the implementation for resolving `.ts` files. Instead of registering the `ts-node` project only once, we now refrain from doing so since there might be multiple projects with different configurations. The current approach involves dynamically switching the implementation for registering and unregistering the project after the `.ts` file has been transpiled and resolved. This change addresses an issue where warnings were encountered when `ts-node` attempted to register with different configurations. The number of configurations is no longer a concern, as each time we need to read a `.ts` file, a new TS project is registered. This adjustment does not impact performance or other attributes because `ts-node` allows native project disabling. Part of the implementation has been adapted from what Nrwl Nx already has; we can find their implementation here: https://github.com/nrwl/nx/blob/master/packages/nx/src/plugins/js/utils/register.ts It's worth noting that their implementation is somewhat versatile, as it also supports SWC. Closes: #1197 Closes: #1213 Closes: #1730
Describe the Bug
Angular with latest TypeScript semver range supports direct import.
Must be changed to:
Minimal Reproduction
Note: Our policy is that issues reported without a reproduction will be closed immediately and then reopened once a reproduction has been provided. Please respect the developers of this project by doing this. We give of our personal time to work on this project and would rather be spending our time fixing or enhancing the library than chasing down badly described or unreproducible issues.
Please delete this note once you have read it.
Expected Behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Additional Context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: