question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

typescript errors on angular@10 with @nguniversal/express-engine@10

See original GitHub issue

following 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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
amitportcommented, Jun 29, 2020

@fgravin you can build the lib yourself but it’s not worth the effort IMO. I just use ts-ignore for now

0reactions
angular-automatic-lock-bot[bot]commented, Aug 5, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found