Conversation
Member
|
@Fdawgs can you take a look at why this is failing? |
Member
|
Not sure why there is node 10, 16 here? 🚭 Syntax detected in the module is incompatible with the module kind according to the package.json or file extension. This is an error in Node and may cause problems in some bundlers. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/UnexpectedModuleSyntax.md
┌───────────────────┬──────────────────────────────────┐
│ │ "@fastify/type-provider-typebox" │
├───────────────────┼──────────────────────────────────┤
│ node10 │ 🟢 │
├───────────────────┼──────────────────────────────────┤
│ node16 (from CJS) │ 🚭 Unexpected module syntax │
├───────────────────┼──────────────────────────────────┤
│ node16 (from ESM) │ 🟢 (ESM) │
├───────────────────┼──────────────────────────────────┤
│ bundler │ 🟢 │
└───────────────────┴──────────────────────────────────┘ |
Member
Author
|
Issue is that the "use strict";
import { TypeCompiler } from '@sinclair/typebox/compiler';
import { Value } from '@sinclair/typebox/value';
export * from '@sinclair/typebox';
export const TypeBoxValidatorCompiler = ({ schema, httpPart }) => {
const typeCheck = TypeCompiler.Compile(schema);
return (value) => {
const converted = httpPart === 'body' ? value : Value.Convert(schema, value);
if (typeCheck.Check(converted)) {
return { value: converted };
}
const errors = [...typeCheck.Errors(converted)];
return {
error: errors.map((error) => ({
message: `${error.message}`,
instancePath: error.path
}))
};
};
};Since the last successful release on September 4th, TypeScript 5.6 released, so that may have broken it? |
Member
Author
Member
|
I recommend always use |
4 tasks
peruukki
added a commit
to peruukki/feast
that referenced
this pull request
Nov 16, 2024
Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Also after upgrading, we get this warning when running `yarn build` but it can be ignored for now: ``` WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree. You may find that it works just fine, or you may not. SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.2.0 YOUR TYPESCRIPT VERSION: 5.6.3 Please only submit bug reports when using the officially supported version. ```
peruukki
added a commit
to peruukki/feast
that referenced
this pull request
Nov 23, 2024
Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Signed-off-by: Harri Lehtola <[email protected]>
peruukki
added a commit
to peruukki/feast
that referenced
this pull request
Nov 28, 2024
Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Signed-off-by: Harri Lehtola <[email protected]>
dmartinol
pushed a commit
to feast-dev/feast
that referenced
this pull request
Dec 1, 2024
Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Signed-off-by: Harri Lehtola <[email protected]>
lokeshrangineni
pushed a commit
to lokeshrangineni/feast
that referenced
this pull request
Dec 2, 2024
) Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Signed-off-by: Harri Lehtola <[email protected]>
tmihalac
pushed a commit
to tmihalac/feast
that referenced
this pull request
Dec 3, 2024
) Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Signed-off-by: Harri Lehtola <[email protected]> Signed-off-by: Theodor Mihalache <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

See fastify/fastify#5694
Checklist
npm run testandnpm run benchmarkand the Code of conduct