tldraw / tldraw

SDK for creating whiteboards and canvas experiences on the web.
https://tldraw.dev
Other
33.88k stars 2.03k forks source link

[Bug]: When you run build app nextjs version 12.3.4 #3734

Closed PequenoJoohn closed 4 weeks ago

PequenoJoohn commented 1 month ago

What happened?

Hello everyone, today I encountered a bug while building my project using nextjs version 12.3.4. I changed the two position on the code removing the reservations names const the archives schema and validate. Altering this positions and next running again the yarn build is works.

Step 1

node_modules/@tldraw/tlschema/dist-cjs/index.d.ts

                   \/  Remove this
static defineEnum<const Values extends readonly unknown[]>(uniqueId: string, options: {
        defaultValue: Values[number];
        values: Values;
    }): EnumStyleProp<Values[number]>;
Captura de Tela 2024-05-10 às 12 09 54

Step 2

node_modules/@tldraw/validate/dist-cjs/index.d.ts

                              \/ Remove this
declare function literalEnum<const Values extends readonly unknown[]>(...values: Values): Validator<Values[number]>;
Captura de Tela 2024-05-10 às 12 21 36

How can we reproduce the bug?

When you run build app nextjs.

What browsers are you seeing the problem on?

No response

Contact Details

No response

Code of Conduct

linear[bot] commented 1 month ago

TLD-2511 [Bug]: When you run build app nextjs version 12.3.4

ds300 commented 4 weeks ago

Thanks for the report! I will close this with no action because it seems like a typescript backwards compat issue.