lukeautry / tsoa

Build OpenAPI-compliant REST APIs using TypeScript and Node
MIT License
3.42k stars 489 forks source link

Compiler Problems #1527

Closed GabrielMazzieiroMaxtrack closed 7 months ago

GabrielMazzieiroMaxtrack commented 7 months ago

I'm trying to migrate my documentation to tsoa but I'm having some problems to compile my project.

I don't know much about configurations so I came here to find a issue related to this, but it does not exist. Can be a personal problem due to lack of experience..

Sorting

Current Behavior

I'm trying to run my project but this error happends. I'm using babel to translate my ts code to js. "@babel/cli": "^7.21.0", "@babel/core": "^7.21.3", "@babel/node": "^7.20.7", "@babel/plugin-proposal-class-properties": "^7.16.7", "@babel/plugin-proposal-decorators": "^7.23.6", "@babel/plugin-proposal-object-rest-spread": "^7.20.7", "@babel/preset-env": "^7.20.2", "@babel/preset-typescript": "^7.21.0",

/home/gabrielmazzieiro/dev/plataform/notification_manager/build/services/push/webPushController.js:16
  async getAll(@((0, _tsoa.Body)())
               ^

SyntaxError: Invalid or unexpected token
    at Object.compileFunction (node:vm:360:18)
    at wrapSafe (node:internal/modules/cjs/loader:1126:15)
    at Module._compile (node:internal/modules/cjs/loader:1162:27)
    at Object..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function._load (node:internal/modules/cjs/loader:911:12)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/home/gabrielmazzieiro/dev/plataform/notification_manager/build/routes/routes.js:8:26)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)

Context (Environment)

Version of the library: 5.1.1 Version of NodeJS: 16.20.2

github-actions[bot] commented 7 months ago

Hello there GabrielMazzieiroMaxtrack 👋

Thank you for opening your very first issue in this project.

We will try to get back to you as soon as we can.👀

WoH commented 7 months ago

This is not tsoa related, that's some transpiling done by babel or tsc.