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

[filterQueryBuilder] TS Compilation error #20

Closed
tonytoth opened this issue Jul 25, 2022 · 5 comments
Closed

[filterQueryBuilder] TS Compilation error #20

tonytoth opened this issue Jul 25, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@tonytoth
Copy link

Hi,
I am not sure if I have to set something in tsconfig but when Nest.js is trying to compile there is a typescript error I guess:

/usr/src/app/node_modules/@ptc-org/nestjs-query-typeorm/src/services/typeorm-query.service.js:27
        this.filterQueryBuilder = opts?.filterQueryBuilder ?? new query_1.FilterQueryBuilder(this.repo);
                                       ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/src/app/packages/query-typeorm/src/services/index.ts:1:1)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
@tonytoth tonytoth added the bug Something isn't working label Jul 25, 2022
@TriPSs
Copy link
Owner

TriPSs commented Jul 29, 2022

Can you share your tsconfig?

@tonytoth
Copy link
Author

Sure.

{
  "compilerOptions": {
    "module": "commonjs",
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es2019",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true,
    "strictNullChecks": true,
    "allowSyntheticDefaultImports": true,
    "paths": {},
    "noImplicitAny": false,
    "skipLibCheck": true,
    "declaration": false,
  },
  "exclude": [
    "node_modules",
    "dist",
  ]
}

@TriPSs
Copy link
Owner

TriPSs commented Jul 29, 2022

Hmm not quite sure, don't see anything weird, you could try to configure it exactly as tsconfig file of examples

@tonytoth
Copy link
Author

Aight, I'll come back with a response soon.

@tonytoth
Copy link
Author

I think it was something related with the node version I had, it was fixed after upgrading to node:16-alpine3.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants