-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
@swc-node/register
broken imports
#729
Comments
I have the same problem with 1.6.7 version. |
Me too |
I did some debugging and found the new I manually tried everything relative and absolute path I could think of and nothing seemed to work, which leads me to believe this is an issue with this library vs. nx. |
@kurt-west not helped for me :( |
@MrRefactoring interesting... thanks for giving it a try. |
I can confirm that removing line: https://github.com/swc-project/swc-node/blob/master/packages/register/read-default-tsconfig.ts#L123 helps. Also confirm that changing this line also helps for -baseUrl: resolve(options.baseUrl ?? './'),
+baseUrl: options.baseUrl != null ? resolve(options.baseUrl): undefined, However i think that baseUrl should not be manipulated on swc side, if user needs to have absolute paths, then probably |
@kurt-west some status? Maybe some plans to restore previous behavior? |
@wszydlak - sorry I'm not a maintainer or contributor to this project and know very little about swc in general. I just ran into the issue at it related to nx and did some investigating. My ping to the group was to confirm everyone was seeing similar behavior in the hopes it would be an easy fix for the swc team. |
@Brooooooklyn any chances to get this work? |
After upgrade version I found similar an issue too:
in this case fs has the |
According to nrwl/nx#18985 (comment) - last change in
@swc-node/register
which addedbaseUrl
to tsconfig broke nx generators, eg:This throws an error:
Cannot find module './subdir/index.js'
At least such a change should not be added as a bugfix, cause it broke bacward compatibility.
This worked great in
@swc-node/register@1.6.6
and has been broken in1.6.7
The text was updated successfully, but these errors were encountered: