eidellev / inertiajs-adonisjs

279 stars 17 forks source link

Unexpected token '<' #74

Closed machist closed 2 years ago

machist commented 2 years ago

Hi, thanks for the wonderful solution. React with typescript is working perfectly fine without SSR.

But when I try to make SSR enabled. I'm getting

[1656072804998] ERROR (rita/2945 on machist): Unexpected token '<'
    err: {
      "type": "SyntaxError",
      "message": "Unexpected token '<'",
      "stack":
          /home/borag/Tmp/rita/resources/js/pages/auth/register.tsx:22
              return (<Layout_1.default links={[]}>
                      ^

          SyntaxError: Unexpected token '<'
              at Object.compileFunction (node:vm:352:18)
              at wrapSafe (node:internal/modules/cjs/loader:1033:15)
              at Module._compile (node:internal/modules/cjs/loader:1069:27)
              at Module._compile (/home/borag/Tmp/rita/node_modules/pirates/lib/index.js:136:24)
              at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
              at Object.newLoader [as .tsx] (/home/borag/Tmp/rita/node_modules/pirates/lib/index.js:141:7)
              at Module.load (node:internal/modules/cjs/loader:981:32)
              at Function.Module._load (node:internal/modules/cjs/loader:822:12)
              at Module.require (node:internal/modules/cjs/loader:1005:19)
              at require (node:internal/modules/cjs/helpers:102:18)
      "status": 500
    }
machist commented 2 years ago

I'm terribly sorry that I mixed tsconfig.json files In the blog

That fixed my problem