DavideViolante/Angular-Full-Stack

Error while running "npm run dev" command

sumanmahto opened this issue · 0 comments

Hi,
I am getting error while running npm run dev command. I have shared the error logs below:

Error Logs
server/test/cats.spec.ts:88:29 - error TS2345: Argument of type '{ name: string; weight: number; age: number; }' is not assignable to parameter of type 'DeepPartial'.
Object literal may only specify known properties, and 'name' does not exist in type 'DeepPartial'.

88 const cat = new Cat({ name: 'Cat', weight: 2, age: 4 });
~~~~~~~~~~~

server/test/users.spec.ts:43:31 - error TS2345: Argument of type '{ username: string; email: string; role: string; }' is not assignable to parameter of type 'DeepPartial'.
Object literal may only specify known properties, and 'username' does not exist in type 'DeepPartial'.

43 const user = new User({ username: 'Dave', email: 'dave@example.com', role: 'user' });
~~~~~~~~~~~~~~~~

server/test/users.spec.ts:58:31 - error TS2345: Argument of type '{ username: string; email: string; role: string; }' is not assignable to parameter of type 'DeepPartial'.
Object literal may only specify known properties, and 'username' does not exist in type 'DeepPartial'.

58 const user = new User({ username: 'User', email: 'user@example.com', role: 'user' });
~~~~~~~~~~~~~~~~

server/test/users.spec.ts:75:31 - error TS2345: Argument of type '{ username: string; email: string; role: string; }' is not assignable to parameter of type 'DeepPartial'.
Object literal may only specify known properties, and 'username' does not exist in type 'DeepPartial'.

75 const user = new User({ username: 'User', email: 'user@example.com', role: 'user' });
~~~~~~~~~~~~~~~~

server/test/users.spec.ts:88:31 - error TS2345: Argument of type '{ username: string; email: string; role: string; }' is not assignable to parameter of type 'DeepPartial'.
Object literal may only specify known properties, and 'username' does not exist in type 'DeepPartial'.

88 const user = new User({ username: 'User', email: 'user@example.com', role: 'user' });
~~~~~~~~~~~~~~~~

Found 12 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! angular2-full-stack@8.1.2 predev: tsc -p server
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the angular2-full-stack@8.1.2 predev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: