Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building #547

Open
alphadever opened this issue Apr 25, 2024 · 6 comments
Open

Error when building #547

alphadever opened this issue Apr 25, 2024 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@alphadever
Copy link

I am getting the following error when running my node project
node_modules/valibot/dist/index.d.ts(2170,27): error TS1139: Type parameter declaration expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2170,42): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2170,65): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2170,74): error TS1005: ')' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2170,94): error TS1109: Expression expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2170,108): error TS1005: ';' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2170,109): error TS1128: Declaration or statement expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2197,32): error TS1139: Type parameter declaration expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2197,47): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2197,70): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2197,79): error TS1005: ')' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2197,99): error TS1109: Expression expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2197,113): error TS1005: ';' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(2197,114): error TS1128: Declaration or statement expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3358,55): error TS1139: Type parameter declaration expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3358,71): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3358,87): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3358,96): error TS1109: Expression expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3358,104): error TS1005: ')' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3358,123): error TS1005: ';' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3358,125): error TS1434: Unexpected keyword or identifier.
[tsc ] node_modules/valibot/dist/index.d.ts(3358,134): error TS1128: Declaration or statement expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3358,135): error TS1128: Declaration or statement expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3381,65): error TS1139: Type parameter declaration expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3381,81): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3381,102): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3381,111): error TS1109: Expression expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3381,119): error TS1005: ')' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3381,138): error TS1005: ';' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3381,140): error TS1434: Unexpected keyword or identifier.
[tsc ] node_modules/valibot/dist/index.d.ts(3381,149): error TS1128: Declaration or statement expected.
[tsc ] node_modules/valibot/dist/index.d.ts(3381,150): error TS1128: Declaration or statement expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5066,58): error TS1139: Type parameter declaration expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5066,77): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5066,92): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5066,103): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5066,106): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5066,114): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5066,131): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5066,144): error TS1005: ')' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5066,168): error TS1109: Expression expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5066,182): error TS1005: ';' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5066,183): error TS1128: Declaration or statement expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5226,58): error TS1139: Type parameter declaration expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5226,77): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5226,92): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5226,103): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5226,106): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5226,114): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5226,131): error TS1005: ',' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5226,144): error TS1005: ')' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5226,168): error TS1109: Expression expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5226,182): error TS1005: ';' expected.
[tsc ] node_modules/valibot/dist/index.d.ts(5226,183): error TS1128: Declaration or statement expected.

@fabian-hiller
Copy link
Owner

Does it work with the skipLipCheck option enabled?

@fabian-hiller fabian-hiller self-assigned this Apr 25, 2024
@fabian-hiller fabian-hiller added the question Further information is requested label Apr 25, 2024
@TithSambath
Copy link

TithSambath commented May 4, 2024

I am facing the same thing when trying to build. it working fine though on dev

image

I am also configure skipLibCheck on my tsconfig.json @fabian-hiller

image

@TithSambath
Copy link

TithSambath commented May 4, 2024

After rechecking valibot doc and my package.json again, I saw my typescript version was below the minimal requirement specify on the doc.

image

Upgrade typescript version >= 5.0.2 , the issue is resolve for me.

image

@fabian-hiller
Copy link
Owner

Are you able to upgrade?

@maranomynet
Copy link

maranomynet commented May 7, 2024

I'm seeing these errors in several projects using typescript v4 (yes, with "skipLibCheck": true), and upgrading them to v5+ is not easy, as it would require upgrading several of their dependencies by major versions.

They will be upgraded (hard to know when) and until then we can't use valibot.

I've found that when writing a library it's generally best to build it with a slightly older, more widely adopted version of typescript.

You might want to consider lowering the typesript version requirement, as a non-breaking feature upgrade for valibot.

@fabian-hiller
Copy link
Owner

Valibot requires one or two features that were introduced with TypeScript >=v5. I do not plan to downgrade the requirement, but what I can consider is releasing a version of Valibot that supports TypeScript v4 as soon as Valibot reaches v1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants