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.

execute start:dev throws error

See original GitHub issue

https://github.com/Sairyss/domain-driven-hexagon/blob/64387c47b07b941843d2f854fc358cde45051787/src/libs/ddd/infrastructure/database/base-classes/typeorm.repository.base.ts#L44-L47

when excute start:dev it throws error

src/libs/ddd/infrastructure/database/base-classes/typeorm.repository.base.ts:47:47 - error TS2769: No overload matches this call.
  Overload 1 of 4, '(entities: DeepPartial<OrmEntity>[], options?: SaveOptions | undefined): Promise<(DeepPartial<OrmEntity> & OrmEntity)[]>', gave the following error.
    Argument of type 'OrmEntity' is not assignable to parameter of type 'DeepPartial<OrmEntity>[]'.
  Overload 2 of 4, '(entity: DeepPartial<OrmEntity>, options?: SaveOptions | undefined): Promise<DeepPartial<OrmEntity> & OrmEntity>', gave the following error.
    Argument of type 'OrmEntity' is not assignable to parameter of type 'DeepPartial<OrmEntity>'.

47     const result = await this.repository.save(ormEntity);

what am i missing?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Sairysscommented, Mar 27, 2022

This is caused by npm upgrade. Newer versions of TypeOrm have breaking changes. Skip the upgrade part and make sure you are using package-lock.json file provided in a repository (and not the one that gets updated by running npm upgrade)

0reactions
pepsi92commented, Mar 27, 2022

Many thanks for pointing me to the right direction.

It seems this issue appeared with typeorm 0.2.42 and is being investigated by the typeorm team (https://github.com/typeorm/typeorm/issues/8681). A fix has been merged yesterday but it seems some users still encounter some issue.

I’ve downgraded the typeorm package to version 0.2.41 and it is working again 👍🏻

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPM start dev server issues - Stack Overflow
Find below the initial error on the terminal. react-scripts start module.js:549 throw err; ^ Error: Cannot find module 'webpack' at Function ...
Read more >
Cannot start dev server with error (node:21264 ... - GitHub
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not...
Read more >
npm err! missing script: "start:dev" - You.com | The AI Search ...
The error is about nodemon. Open the package.json, is at the same folder with server.js. Find:.
Read more >
Error.prototype.stack - JavaScript - MDN Web Docs - Mozilla
The non-standard stack property of an Error instance offers a trace of which functions were called, in what order, from which line and...
Read more >
First steps | NestJS - A progressive Node.js framework
If you want to make it throw an error instead disable the option abortOnError (e.g., NestFactory.create(AppModule, { abortOnError: false }) ). Learn the...
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