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
Cannot find name 'ProgressEvent' when compiling TypeScript #3219
Comments
This is a bug that presents in TypeScript projects that do not use Should be solvable by adding triple slash directive pointing to Should be an easy fix for beginners :) |
As a quick fix, you can downgrade the axios version by using the following in your "dependencies": {
"axios": "^0.19.0"
} Make sure to re-run |
Just following @trgwii suggestion. Works for me at least.
Just following @trgwii suggestion. Works for me at least. Triple slash directives are supported from typescript 3 so I updated the dependency to ^3.9.7 this might be a breaking change
Just following @trgwii suggestion. Works for me at least. Triple slash directives are supported from typescript 3 so I updated the dependency to ^3.9.7 this might be a breaking change
@trgwii as a beginner I tried to solve the issue following your suggestion. Unfortunately triple slash directives are only supported from Typescript v3. So, I'm not confident it will be merged. I may try to give it another attempt by copying the definition from the lib dom file into the axios definition file, this should work too I guess. |
I copied the lib dom TS file definitions needed to make the ProgressEvent reference compiling on NodeJS while keeping Typescript 2 compatibility
I copied the lib dom TS file definitions needed to make the ProgressEvent reference compile on NodeJS while keeping Typescript 2 compatibility
👋 Hey folks, I'd like to suggest to avoid the dependency on lib dom and instead of using a triple-slash directive replace Please see my proposal at #3228. Thanks, CC: @Guillaume-Mayer, @bennyn |
Any progress on this one? It's a critical bug which can not be bypassed if typescript is running on pure node js env. |
@Mister-Hope In case you don't need any 0.20.0 features, check out my comment above for a fix. |
Just a little curious that nearly half a month has passed, and it's not fixed yet. |
nice ... |
Are there plans to merge @jan-molak's proposed PR? Thanks for the work on this. edit: adding "DOM" to tsconfig "lib" array is a good workaround btw, tested and it appears to work! |
Hi @AuspeXeu, At the moment only Emily can do this, Nick and Matt could but they are not actively maintaining the project as they handed over to Emily. I know Emily is pretty busy with stuff but I do have direct communication with her and the release is planned to go out in the next few days. |
Ah, sweet. Given how many people rely on axios, it might be good if you also have this sort of authorization. Maybe worth mentioning it to her :) |
Adding "DOM" to the tsconfig lib field works somehow :) |
Hi, Thanks for the great library and the work, it's really appreciated to be able to have this library up and running 🎉! Thanks, really appreciated! |
Axios 0.20.0 has a bug which prevents typescript builds: axios/axios#3219
Just to update everyone I have asked again today to see when the release will happen, will update this thread as soon as I know whats going on. |
@AuspeXeu Why are you sending me the confused emoji? An issue should be closed the time a linked PR is merged. |
This worked like a charm |
Hi, Version 0.21.0 has been released 🎉 please use that and let us know if that solves your issue. Thanks |
Upgraded to v0.21.0 and can confirm that we can now build successfully without needing to include the |
I am getting this error as of today when trying to build a typescript project (by running
{
"compilerOptions": {
"sourceMap": true,
"outDir": "dist",
"strict": true,
"lib": ["esnext"],
"esModuleInterop": true,
"experimentalDecorators": true,
"target": "ES6",
"module": "CommonJS"
},
"include": ["src"],
"ts-node": {
"files": true
}
} Update: A fix has been merged, but not published yet. Try this workaround in the meanwhile. |
I also had this error today & am happy to share that the fix has been merged as of v1.2.1. Updating fixed it for me. |
Describe the bug
When trying to compile a Firebase function (Node.js / TypeScript) I get an error:
To Reproduce
Example of a
package.json
that fails to compile usingnpm run build
.Expected behavior
The Node.js code should compile.
Environment
Additional context/Screenshots
None.
The text was updated successfully, but these errors were encountered: