Reputation: 387
I have cloned jhipster-sample-app-nodejs from github (link).
I have followed all instructions for compiling and running the application
I have installed all the required tools to execute (npm, nodejs, yo)
When I try to run my app with npm start
this error message appears:
return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
src/web/rest/user.controller.ts:29:54 - error TS2345: Argument of type 'string | Query | (string | Query)[]' is not assignable to parameter of type 'string | number'.
Type 'Query' is not assignable to type 'string | number'.
Type 'Query' is not assignable to type 'string'.
29 const pageRequest: PageRequest = new PageRequest(req.query.page, req.query.size, req.query.sort);
~~~~~~~~~~~~~~
at createTSError (C:\Users\uname\Desktop\test\jhipster-sample-app-nodejs-master\server\node_modules\ts-node\src\index.ts:240:12)
at reportTSError (C:\Users\unmae\Desktop\test\jhipster-sample-app-nodejs-master\server\node_modules\ts-node\src\index.ts:244:19)
at getOutput (C:\Users\uname\Desktop\test\jhipster-sample-app-nodejs-master\server\node_modules\ts-node\src\index.ts:360:34)
at Object.compile (C:\Users\uname\Desktop\test\jhipster-sample-app-nodejs-master\server\node_modules\ts-node\src\index.ts:393:11)
at Module.m._compile (C:\Users\uname\Desktop\test\jhipster-sample-app-nodejs-master\server\node_modules\ts-node\src\index.ts:439:43)
at Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Object.require.extensions.<computed> [as .ts] (C:\Users\uname\Desktop\test\jhipster-sample-app-nodejs-master\server\node_modules\ts-node\src\index.ts:442:12)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1042:19)
[nodemon] app crashed - waiting for file changes before starting...
Can someone helps me with this error?
Thank you in advance.
Upvotes: 0
Views: 124
Reputation: 6352
This issue was reported in the NodeJS blueprint and fixed in this pull request. A new version of the blueprint containing the fix has not been released yet. The sample app uses the latest release, so it contains this issue.
The fix is to update the server/package.json
file as described on a related Github issue:
"devDependencies": {
"@types/express-serve-static-core": "4.17.3",
Upvotes: 2