Erro build tsc
Closed this issue · 8 comments
{
"extends": "../tsconfig",
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"outDir": "./dist",
"removeComments": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"baseUrl": "./",
},
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2015",
"dom"
],
"include": ["./"],
"exclude": ["./node_modules", "**/*.test.ts"]
}
server/node_modules/@overnightjs/core/lib/Server.d.ts:9:19 - error TS1086: An accessor cannot be declared in an ambient context.
9 protected get app(): Application;
~~~
server/node_modules/@overnightjs/core/lib/Server.d.ts:10:19 - error TS1086: An accessor cannot be declared in an ambient context.
10 protected get showLogs(): boolean;
~~~~~~~~
server/node_modules/@overnightjs/core/lib/Server.d.ts:11:19 - error TS1086: An accessor cannot be declared in an ambient context.
11 protected set showLogs(showLogs: boolean);
~~~~~~~~
Found 3 errors.
I think this might be a TypeScript version issue. here. Try upgrading your version of TypeScript.
Thanks for the answer.
My typescript is version ~3.5.3. Is this a problem?
Try the latest version and see if that fixes the issue.
Update your typescript to the lastest version : npm install -g typescript
Please let me know if that works @tomasguerreiro so I can close this.
First of all I would like to point out that even with the errors mentioned the JS code works.
In a separate project also works perfectly
unfortunately I can't update my project typescript with the error because it is integrated in an angular project.
Anyway your project is being very useful for me. If a solution to this angular problem is not possible, no problem. Thank you so much for your work.
I used the an older version of typescript in version 1.6.9. I used TypeScript 3.7 to transpile 1.6.11 You can try @overnightjs 1.6.9 which uses '@children' instead of '@ChildControllers' as the only difference beside from the TypeScript version. I'm going to close this issue since you got it working a stand alone project with a newer typescript version.