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
Module '"http"' has no exported member 'ServerRequest'. #124
Comments
Thanks for the heads up @rp3e11 - we'll take a look at updating this to work as expected In the meantime, updating your |
Ok, thanks, do you have any idea how long it will take to fix it? |
@rp3e11 we happily accept PRs if you would like to send a pull request with the fix in it we will merge and push a dev version with your fix in it quickly |
Is there anywhere some documentation on contributing and setting up a dev environment? |
@rp3e11 is it an option for you to set This is a TypeScript issue that likely started after we added support for an Angular 8 release. The ideal fix for the TS errors that sometimes show up would be to upgrade to a new version of TS, but that could cause issues for people using older versions. Ideally we'd add a fix for this to a future major release of the angular sdk. |
@ca136 I added the skipLibCheck flag to my dev environment to see whether it works and I could do some testing with builder to understand the potential. However, for the production environment I don't think it is a good idea, because it does not only disable the check for your package but also all others that we use. I think I will wait anyway for your next release since I am waiting for https://forum.builder.io/t/angular-integration/31/5. In terms of the error, I think as well that it is a typescript error, but to my understanding the error means that the type ServerRequest is not defined in the http module of nodejs and looking at the API docs it is not. From the issue linked earlier it seems that it should be replaced by IncomingMessage in builder.class.ts and it should work, so the fix should be fast. However, in order to test that it doesn't affect any other parts of your code, I was wondering whether you had test in place or how your dev system is built up, so I could test it before providing a pull request. |
It seems to be deprecated in node 9 that is used in your package.json type definitions. It probably dropped out in the meantime. /**
* @deprecated Use IncomingMessage
*/
export class ServerRequest extends IncomingMessage {
connection: net.Socket;
} |
Oh good find @rp3e11 ! I had a bunch of other issues in our angular example repo due to being on an older version of Angular (8) and TypeScrip (3.5). It looks like Angular fixed the cli so Angular 9 will work with our existing code. I'll let you know when we publish a new version of the sdk that you can test! |
@rp3e11 this should be fixed in the latest |
Hi,
I get the following issue when trying to serve an angular application after importing BuilderModule in angular. It happens when using it in existing Angular 8 and also in a fresh Angular 9 app.
ERROR in node_modules/@builder.io/sdk/dist/src/builder.class.d.ts:2:10 - error TS2305: Module '"http"' has no exported member 'ServerRequest'.
I had a look around and found one issue on a different project that seems to be similar
The text was updated successfully, but these errors were encountered: