You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Nx Transformer "is not a Transformer Plugin" #166
Also, the README example for the plugin is missing a quote before "name". https://github.com/LeDDGroup/typescript-transform-paths/blob/master/README.md?plain=1#L85, and the export isn't correct because I get the additional warning "typescript-transform-paths/nx-transformer" plugin could not be found! (which is why you see I'm pointing to dist/plugins/nx-transformer-plugin above).
Thanks for the report. Are you able to provide a reproduction repo?
Regarding the message: It does not provide neither before(), after(), nor afterDeclarations(), this indicates that at least one of those properties is required. If none are present, it throws this error. That being said, we provide 2 of 3, which is all that we need, so you shouldn't be getting this error.
This seems to indicate an issue with the actual export. Sounds like an ESM vs. CJS issue.
My guess is this either has to do with your nx version or ESM woes. In any case, if you can provide a repro, I will be happy to take a look when I can!
Or if you'd like to dig into personally, I'd also welcome any insight you might find on what's going on.
changed the title [-][Bug] Nx Transformer "is not a Transformer Plugin", is missing "after"[/-][+][Bug] Nx Transformer "is not a Transformer Plugin"[/+]on Oct 24, 2022
I cloned the typescript-transform-paths repo and installed the local version ("typescript-transform-paths": "file:../../typescript-transform-paths" in package.json) and it worked fine. Makes be think it's something Nx is doing with it's local module resolution?
Seems it was a silly oversight on my part! The original work was done in a PR. I changed the entry file name but forgot to update it in the package.json.
v3.4.4 should cover you. Thanks for the repro. Let me know if you face any other issues!
Activity
nonara commentedon Oct 24, 2022
Thanks for the report. Are you able to provide a reproduction repo?
Regarding the message:
It does not provide neither before(), after(), nor afterDeclarations(), this indicates that at least one of those properties is required. If none are present, it throws this error. That being said, we provide 2 of 3, which is all that we need, so you shouldn't be getting this error.This seems to indicate an issue with the actual export. Sounds like an ESM vs. CJS issue.
We don't face either of the reported issues in our test setup. See: https://github.com/LeDDGroup/typescript-transform-paths/blob/master/test/projects/nx/packages/library1/project.json
My guess is this either has to do with your nx version or ESM woes. In any case, if you can provide a repro, I will be happy to take a look when I can!
Or if you'd like to dig into personally, I'd also welcome any insight you might find on what's going on.
[-][Bug] Nx Transformer "is not a Transformer Plugin", is missing "after"[/-][+][Bug] Nx Transformer "is not a Transformer Plugin"[/+]bkewl commentedon Oct 24, 2022
Thanks for the quick reply!
You're right about the at least one requirement there. The grammar of the error message confused me.
We have created a repro-repo here: https://github.com/PatchOnKnee/fictional-winner
npx nx run test-lib:buildI cloned the
typescript-transform-pathsrepo and installed the local version ("typescript-transform-paths": "file:../../typescript-transform-paths"inpackage.json) and it worked fine. Makes be think it's something Nx is doing with it's local module resolution?nonara commentedon Oct 24, 2022
Seems it was a silly oversight on my part! The original work was done in a PR. I changed the entry file name but forgot to update it in the
package.json.v3.4.4should cover you. Thanks for the repro. Let me know if you face any other issues!bkewl commentedon Oct 24, 2022
v3.4.4works a charm. Thank you!