drodil / backstage-plugin-toolbox

Most commonly used developer tools within Backstage
MIT License
45 stars 23 forks source link

Backstage 1.27 Build fails with Toolbox 1.21.0 #101

Closed christianherweg0807 closed 1 month ago

christianherweg0807 commented 4 months ago

I Have started getting error: ERROR: Big integer literals are not available in the configured target environment ("es2019") while running yarn workspace backend build

For Details see: https://github.com/backstage/backstage/issues/24939

A downgrade to 1.20.5 helps.

regards Christian

drodil commented 4 months ago

@helltf any idea why this is happening? The latest release contained only the new tool for generating types.

helltf commented 4 months ago

no clue, maybe the quicktype package is not compatible with es2019

helltf commented 4 months ago

I could not replicate this problem, upgraded to backstage version 1.27.5 and installed version 1.21.0 of this plugin. No Error message, no problem, works as expected.

my tsconfig

{
  "extends": "@backstage/cli/config/tsconfig.json",
  "include": [
    "packages/*/src",
    "plugins/*/src",
    "plugins/*/dev",
    "plugins/*/migrations"
  ],
  "exclude": [
    "node_modules"
  ],
  "compilerOptions": {
    "jsx": "react",
    "outDir": "dist-types",
    "rootDir": ".",
    "resolveJsonModule": true,
  }
}

Tried with ES2020 as target, still no problem

fshowalter commented 4 months ago

Confirm I'm seeing it too. This change https://github.com/backstage/backstage/pull/24776 should resolve it once released.

drodil commented 4 months ago

@fshowalter thanks for confirming, probably have to live with this until the next backstage release on 18th of June. So my suggestion is to go with 1.20.5 until that.

brianphillips commented 3 months ago

I'm still getting the same error with backstage v1.28.0 and @drodil/backstage-plugin-toolbox@1.22.0. Downgrading to 1.20.5 fixes it of course but I was expecting the 1.28.0 release to fix it. Is there something else I need to reset/update/clean or are others also still getting this build error?

drodil commented 3 months ago

Thanks for reporting, it's weird as the https://github.com/backstage/backstage/pull/24776 should have fixed that. I will take a look if I have time before my holiday (starting tomorrow) and if nothing else, we have to get rid of the breaking tool to continue getting new ones in.

drodil commented 3 months ago

Ah, probably if I bump also the toolbox to use the latest backstage packages it could fix the issue.

drodil commented 3 months ago

Next try with v1.22.1!

drodil commented 3 months ago

Nope, didn't help. I don't know if the tsconfig.json should be changed somehow or if we should just get rid of the breaking tool, WDYT?

fshowalter commented 3 months ago

I don't think it's a Typescript issue per se, but an esbuild one, as I think Backstage uses that versus Typescript compiler for the source transformation these days.

The frustrating thing is, I haven't found a way to debug it to see which file/line is tripping the error and/or where it's getting the 2019 config....

dweber019 commented 2 months ago

Can confirm that I have the error with Backstage 1.28.4

dariozachow commented 2 months ago

After some debugging found out that setting this to es2020 in the backstage cli package https://github.com/backstage/backstage/blob/d73302be50d5dcc91ff6fc6da60355183abeb8f3/packages/cli/src/lib/bundler/optimization.ts#L31 the build no longer fails.

The error originates from the quicktype-core package

michaelsync-bn commented 2 months ago

How do you set this to es2020 in the backstage cli? I got same issue with backstage "1.29.1" and toolbox 1.22.1.

I don't really see the option in doc to set it. The latest code is here https://github.com/backstage/backstage/blob/b24d5b0aa4fba4a26db16d0d695e140b5da1f233/packages/cli/src/lib/bundler/optimization.ts#L37

dariozachow commented 2 months ago

You can't really do this, I've edited the code directly in my node_modules

drodil commented 2 months ago

How about proposing upstream change? I think @Rugvip changed already some of these to 2020?

dariozachow commented 2 months ago

https://github.com/backstage/backstage/issues/25737 @drodil I've created this Issue for reference. Not sure if I have the time to propose a PR for this

drodil commented 2 months ago

Made a PR to upstream, have to wait for the next release :(

CptnFizzbin commented 1 month ago

Can confirm that this is still an issue for Backstage 1.29 with a fresh install of both Backstage and the toolbox plugin: https://github.com/CptnFizzbin/backstage-toolbox-test/commit/03d20c78d1705f9aa589479152f91bf3cb638a4d

drodil commented 1 month ago

@CptnFizzbin thanks, it's a known issue. Is anyone able to try with the latest -next release of backstage with https://github.com/backstage/backstage/pull/25738 included? Or does it actually require rebuilding this plugin 🤔 Maybe it's best to wait for the 1.30.0. For now 1.20.5 version of this plugin works.

CptnFizzbin commented 1 month ago

I can confirm that 1.22.1 builds fine with 1.30.0-next.3

drodil commented 1 month ago

Should be fine now with 1.30.x+. Closing this issue!