typescript errors on angular@10 with @nguniversal/express-engine@10
See original GitHub issuefollowing the initial installation instruction in angular.io (ng add
):
ERROR in server.ts:18:25 - error TS2345: Argument of type '(filePath: string, options: Readonly<RenderOptions>, callback: (err?: Error | null | undefined, html?: string | undefined) =
> void) => void' is not assignable to parameter of type '(path: string, options: object, callback: (e: any, rendered?: string | undefined) => void) => void'.
Types of parameters 'options' and 'options' are incompatible.
Type '{}' is missing the following properties from type 'Readonly<RenderOptions>': req, bootstrap
18 server.engine('html', ngExpressEngine({
~~~~~~~~~~~~~~~~~
19 bootstrap: AppServerModule,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 }));
~~~~
server.ts:37:3 - error TS2322: Type 'Express' is not assignable to type 'void'.
37 return server;
~~~~~~~~~~~~~~
server.ts:45:10 - error TS2339: Property 'listen' does not exist on type 'void'.
45 server.listen(port, () => {
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
False Typescript Errors using Angular Spa Template after 15.9 ...
It seems like msbuild typescript integration is generating these when it should be disbaled due to the presence of the ts.config files in...
Read more >Angular 10 End Point(id) Is Not A Function - Stack Overflow
So, Javascript correctly errors out when you pass the number 5 as first parameter instead of actual function. Why does the API get...
Read more >TypeScript configuration - Angular
When the compiler doesn't recognize something, it reports an error. Use TypeScript type definition files — d.ts files — to tell the compiler...
Read more >Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >Angular 14 Promise by Example - DEV Community
In this tutorial, we'll learn about JavaScript promises and we'll see how to use them by example with Angular 10 and HttpClient.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@fgravin you can build the lib yourself but it’s not worth the effort IMO. I just use ts-ignore for now
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.