#Yarn tsc not working after upgrade from 1.20.2 to current version

20 messages · Page 1 of 1 (latest)

magic ember
#

Hello,
I want to upgrade from 1.20.2 to the current version. yarn backstage-cli versions:bump works fine but when I try to create the new docker image yarn tsc fails:

yarn tsc
yarn run v1.22.19
$ tsc
node_modules/@backstage/core-plugin-api/dist/alpha.d.ts:123:59 - error TS1139: Type parameter declaration expected.

123 declare function createTranslationRef<TId extends string, const TNestedMessages extends AnyNestedMessages, TTranslations extends {
...

Found 11 errors in the same file, starting at: node_modules/@backstage/core-plugin-api/dist/alpha.d.ts:123

error Command failed with exit code 2.

Can you please help me?

rugged talon
#

hey, did you resolve this?

trail grotto
grim gulch
#

I have the same issue, trying to update from 1.21.1 😦

grim gulch
#

Have you been able to fix that? I somewhat suspect versions of some modules being not compatible with each other

trail grotto
#

I haven't been able to find a fix yet unfortunately

fresh cypress
#

if you run yarn why @backstage/core-plugin-api how many different versions are there?

#

wondering if there's some issue with duplicates?

modern mantle
#

FWIW - I was having similar trouble with python 3.12.2; setting python 3.11.8 pyenv local 3.11 did the trick.

fleet sparrow
#

I had the same problem as here. I had to add some type definitions that I didnt need before. Now I'm getting the following error. Which is concerning, we use zero azure tools

#

app: Loaded config from app-config.yaml
app:
app:
app: Error: Failed to compile '../../../../../.yarn/berry/cache/@azure-core-util-npm-1.6.1-320643eba9-10c0.zip/node_modules/@azure/core-util/dist-esm/src/checkEnvironment.js':

lime plaza
cedar ravine
lime plaza
lime plaza
cedar ravine
#

Nice! Heads up that it's best to stick to a ~ range for typescript, since their releases don't follow semver, there's no significant difference between minor and major releases. Otherwise you might as well use * 😅

lime plaza
#

How did you found out that typescript is the issue if i may ask 🙂

undone gust
#

the code that it complained about had a const type constraint which is a novel thing in the typescript world - and we know that we have upgraded our minimum TS requirement some time ago

#

so it would seem that you may have missed that note from a previous upgrade