-
Notifications
You must be signed in to change notification settings - Fork 30
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
kiota with angular error #1442
Comments
Hi @marcioatws , First off, can you try upgrading the kiota bundle to preview 71 please? We realized we had some version requirements misalignment. See #1440 for more context. We also recently fixed the multipart issue in #1423, and I believe the reason you're not seeing the fix on your end is because of the versioning issue mentioned above, hopefully this should also go away with the upgrade. As for zlib, it's strange the code is going down this path since that's the path for a node/backend application.
Maybe we'd need to add |
Hello! Upgrading to version 71 did not resolve the issue. The fix is not in the package yet. As for zlib, I think the problem is not in the function that validates whether it is Node or not. The Angular builder simply complains about the existence of the code, whether it is used or not. It is related to the new builder used: esbuild. I adjusted it more cleanly, adding to the Angular configuration that zlilb is an external dependency, I'll leave the code here in case anyone faces the same problem
|
Thank you for the additional information. To be clear, after adjusting the configuration, you were able to build and run the application? |
@baywet Using the configuration mentioned above with Kiota TS Version 74 and Kiota v1.20.0 this works. But this seems more like workaround. |
yes it works, but as mentioned it seems to be a workaround. |
Thank you for the additional information. This is most likely caused by this dynamic import and the way angular applications are built.
(which is in fact node:zlib, only available for node applications) What I don't understand is why do we need any of that at all, since the browser compression is implemented with CompressionStream which has been available since nodejs 18 and since node 17 and below have been EOL for over a year now I believe the most straightforward solution here is to remove the nodeJS specific implementation, and make sure the browser implementation works in both contexts. Since @rkodev is the one who implemented the feature, I'd like him to provide input to this discussion. |
@baywet, we can drop the node specific implementation and only keep the compression stream as mentioned. |
Thanks for your input. Can you start a pull request please? |
Sorry for my english, it's not my native language.
kiota version:
1.19.1+d294e04ba7f756896878a7015df1648f9dc0bcde
kiota bundle version:
1.0.0-preview.70
angular cli:
18.2.10
angular dev kit:
18.2.10
angular builder configuration:
production:
"builder": "@angular-devkit/build-angular:application"
development:
"builder": "@angular-devkit/build-angular:dev-server"
tsconfig
I can run in dev without errors, but when i try run production:
and
my temporary solution was to fix the signature and remove the node compression code. Is it supposed to be like that, or is it some bug?
thanks in advance.
The text was updated successfully, but these errors were encountered: