-
Notifications
You must be signed in to change notification settings - Fork 607
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
TypeError: parser.parseStringPromise is not a function #601
Comments
Are you using the version from git `master`?
|
Whatever version is installed using |
That might not have the function yet.
|
Is there a timeline for getting |
Is there any update on this issue? It's now June and the npm version still does not have this function available. |
I used the following workaround while waiting for this to be fixed (Typescript):
|
the problem is in @types/xml2js
it is missing the entire function block. It should look something like
|
but with that I am getting an "Error: Unexpected end" at the end of my XML string(s) from the SaxJS parser :-( |
Hi, I faced the same issue, but in a bit different way. Here is my class code:
When I run this function inside tests, everything works fine:
When I added this class as dependency to http server, and call the endpoint (POST method) through Postman, i've got an error:
Aslo I have a couple of other endpoints (GET methods), and they work fine. No such error |
This is a typescript definition file - it inherently cannot have an implementation since it's just declaring and exporting types of exported symbols from the javascript module, so if .dts file has a declaration in it it doesn't necessarily mean that an exported symbol of the module declared in the file actually exists in the module. |
@MadProbe why would something that doesn't exist be declared in the definition file?! |
|
FYI - I'm still seeing this issue w/ the npm-installed v0.4.23. Can this get fixed in the next release? |
You can write your own
usage:
|
Following the Promise example from the README, I get the error message "TypeError: parser.parseStringPromise is not a function"
The text was updated successfully, but these errors were encountered: