-
Notifications
You must be signed in to change notification settings - Fork 554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
running npm server produces error #10
Comments
this is a windows pc with the latest verison of Node |
this is in the 1-start branch |
solved it by adding toString in three places
|
Also you have transformed string to number (+courseId) in line 25. I've encountered the same issue. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
c:\git-repositories\github\ngrx-course>npm run server
c:\git-repositories\github\ngrx-course\node_modules\ts-node\src\index.ts:307
throw new TSError(formatDiagnostics(diagnosticList, cwd, ts, lineOffset))
^
TSError: ⨯ Unable to compile TypeScript
server\search-lessons.route.ts (19,35): Argument of type 'string | ParsedQs | string[] | ParsedQs[]' is not assignable to parameter of type 'string'.
Type 'ParsedQs' is not assignable to type 'string'. (2345)
server\search-lessons.route.ts (20,33): Argument of type 'string | ParsedQs | string[] | ParsedQs[]' is not assignable to parameter of type 'string'.
Type 'ParsedQs' is not assignable to type 'string'. (2345)
server\search-lessons.route.ts (22,63): This condition will always return 'false' since the types 'number' and 'string | ParsedQs | string[] | ParsedQs[]' have no overlap. (2367)
server\search-lessons.route.ts (25,102): Property 'toLowerCase' does not exist on type 'string | ParsedQs | string[] | ParsedQs[]'.
Property 'toLowerCase' does not exist on type 'string[]'. (2339)
at getOutput (c:\git-repositories\github\ngrx-course\node_modules\ts-node\src\index.ts:307:15)
at c:\git-repositories\github\ngrx-course\node_modules\ts-node\src\index.ts:336:16
at Object.compile (c:\git-repositories\github\ngrx-course\node_modules\ts-node\src\index.ts:496:11)
at Module.m._compile (c:\git-repositories\github\ngrx-course\node_modules\ts-node\src\index.ts:392:43)
at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Object.require.extensions. [as .ts] (c:\git-repositories\github\ngrx-course\node_modules\ts-node\src\index.ts:395:12)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] server:
ts-node -P ./server/server.tsconfig.json ./server/server.ts
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] server 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:
npm ERR! C:\Users\DHarms\AppData\Roaming\npm-cache_logs\2020-07-30T11_26_50_778Z-debug.log
c:\git-repositories\github\ngrx-course>
The text was updated successfully, but these errors were encountered: