Skip to content
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

Cannot compile app:: 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'. #126

Closed
stisko opened this issue Apr 20, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@stisko
Copy link

stisko commented Apr 20, 2020

After following all the instructions, from the readme, i cannot run my application (the same happens on sample app nodejs.

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...

Why this happen?

@stisko stisko closed this as completed Apr 20, 2020
@ghost
Copy link

ghost commented Apr 20, 2020

Linked to #120

@ghost ghost added the duplicate This issue or pull request already exists label Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

1 participant