#is this a known issue when upgrading

1 messages · Page 1 of 1 (latest)

wild fern
#

I had something similar to that I think. Can you paste your tsconfig.json?

lusty knot
#
{
  "compilerOptions": {
    "target": "ES2022",
    "moduleResolution": "Node",
    "experimentalDecorators": true,
    "paths": {
      "@dagger.io/dagger": ["./sdk"]
    }
  },
}```
#

generated by mod init in 0.9.5

wild fern
#

does removing the trailing comma on the second last } fix it?

lusty knot
#

yes 😅

#

thank you

wild fern
#

Haha, I had the same thing but assumed I messed something up. Is this already tracked somewhere @tranquil acorn ?

dull merlin
#

and didn't complain about it, but now 0.9.7 does

wild fern
dull merlin
#

Got it. Thinking we should provide a better error message at the least.

wild fern
#

Yeah it's coming from pretty deep. It took me a minute to figure out the source. Ideally if anything is fixed we can just rewrite that tsconfig or go back to however it was being parsed before that worked

dusk crypt
tranquil acorn
#

Basically, this PR is updating the TS config if necessary, so it parse it using JSON.parse, but in the previous init, the tsconfig.json had an extra comma that break the function JSON.parse.
So you need to remove that comma so the JSON can be valid and successfully parsed!

wild fern
#

Got it! So if you have an existing typescript module, you'll have to edit the tsconfig to make it work for 0.9.7+, correct?

dusk crypt
wild fern
dusk crypt
#

That's because there's custom stuff there, for ./sdk.