-
Notifications
You must be signed in to change notification settings - Fork 4
NestJS app does not compile when typescript-functional-extensions package is referenced #3
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
Comments
Ah, this is probably related to how I'm building the library. I create a native ES Module package for this library, which can't be used with the You can see the target for output for the TypeScript compilation. I believe this is related to nestjs/nest#7021 So either Nest needs to be used with a bundler/build process to convert the ES Module to CommonJs to be used with Nest, or I need to compile this library to CommonJs. I'm currently using this library in multiple Vue projects (bundled with Webpack and Vite) and it works fine. Also, if someone is using modern JS and ES Modules natively, they can use this library without needing a bundler. I could explore potentially creating 2 packages or including a CommonJs build in the package along side the ES Module build, but I'd prefer to always ship ES Modules in the package vs creating a legacy package. |
Try installing https://www.npmjs.com/package/typescript-functional-extensions/v/1.0.1-alpha.1 I added dual ES Module / CommonJs support in a branch. I'll need to test it on my projects, but if it works for both of us, I'll publish it as 1.0.1. |
Thank you! It works like a charm with Nest projects! From my point of view it's ready to be published. |
Glad it works. I'm still testing on my end and I'm working on #4. I should be able to get that 1.0.1 out in the next day or two. |
Published as v1.0.1 |
Hello.
First I'd like to say that I really appreciate the hard work you've put into the library. I'm coming from the C# world into the TypeScript and now I can use my favorite library in TypeScript!
I'm currently developing applications using NestJS. When I try to reference the library it throws me compilation errors like below.
When I copy source code of the library into my project everything runs just fine.
This is a sample service where I use it:
To Reproduce
Steps to reproduce the behavior:
start
orstart:dev
script.Expected behavior
App should run successfully.
The text was updated successfully, but these errors were encountered: