Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Server not starting: Argument of type 'unknown' is not assignable to parameter of type '{}'. #84

Open
cjycathy opened this issue Sep 16, 2019 · 0 comments

Comments

@cjycathy
Copy link

I've been following the instructions from the readme, and run on the ubuntu of Windows Subsystem for Linux, but at the point where I'm trying to run the app locally with npm run start, I'm getting this error:

/home/cjycathy/cognitive-social-crm/server/node_modules/ts-node/src/index.ts:261
[1]     return new TSError(diagnosticText, diagnosticCodes)
[1]            ^
[1] [nodemon] app crashed - waiting for file changes before starting...
[1] TSError: ⨯ Unable to compile TypeScript:
[1] src/util/EnrichmentPipeline.ts(75,34): error TS2769: No overload matches this call.
[1]   Overload 1 of 2, '(o: {}): string[]', gave the following error.
[1]     Argument of type 'unknown' is not assignable to parameter of type '{}'.
[1]   Overload 2 of 2, '(o: object): string[]', gave the following error.
[1]     Argument of type 'unknown' is not assignable to parameter of type 'object'.
[1] src/util/EnrichmentPipeline.ts(75,59): error TS2769: No overload matches this call.
[1]   Overload 1 of 2, '(o: {}): string[]', gave the following error.
[1]     Argument of type 'unknown' is not assignable to parameter of type '{}'.
[1]   Overload 2 of 2, '(o: object): string[]', gave the following error.
[1]     Argument of type 'unknown' is not assignable to parameter of type 'object'.
[1]
[1]     at createTSError (/home/cjycathy/cognitive-social-crm/server/node_modules/ts-node/src/index.ts:261:12)
[1]     at getOutput (/home/cjycathy/cognitive-social-crm/server/node_modules/ts-node/src/index.ts:367:40)
[1]     at Object.compile (/home/cjycathy/cognitive-social-crm/server/node_modules/ts-node/src/index.ts:558:11)
[1]     at Module.m._compile (/home/cjycathy/cognitive-social-crm/server/node_modules/ts-node/src/index.ts:439:43)
[1]     at Module._extensions..js (module.js:663:10)
[1]     at Object.require.extensions.(anonymous function) [as .ts] (/home/cjycathy/cognitive-social-crm/server/node_modules/ts-node/src/index.ts:442:12)
[1]     at Module.load (module.js:565:32)
[1]     at tryModuleLoad (module.js:505:12)
[1]     at Function.Module._load (module.js:497:3)
[1]     at Module.require (module.js:596:17)
[1]     at require (internal/module.js:11:18)
[1]     at Object.<anonymous> (/home/cjycathy/cognitive-social-crm/server/src/index.ts:13:1)
[1]     at Module._compile (module.js:652:30)
[1]     at Module.m._compile (/home/cjycathy/cognitive-social-crm/server/node_modules/ts-node/src/index.ts:439:23)
[1]     at Module._extensions..js (module.js:663:10)
[1]     at Object.require.extensions.(anonymous function) [as .ts] (/home/cjycathy/cognitive-social-crm/server/node_modules/ts-node/src/index.ts:442:12)

the EnrichmentPipeline.ts(75,34):

response[Object.keys(e)[0]] = ets[Object.keys(e)[0]];

Any help is very much appreciated!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant