genkit
genkit copied to clipboard
[JS] 'Import attributes cannot be used with a type-only import' when formatting TypeScript
./js/plugins/mcp/src/client/message.ts:17:73 syntax/correctness/noTypeOnlyImportAttributes ━━━━━━━━━━
✖ Import attributes cannot be used with a type-only import.
15 │ */
16 │
> 17 │ import type { PromptMessage } from '@modelcontextprotocol/sdk/types.js' with {
│ ^^^^^^
> 18 │ 'resolution-mode': 'import',
> 19 │ };
│ ^
20 │ import { MessageData, Part } from 'genkit';
21 │
ℹ The type-only import is defined here.
15 │ */
16 │
> 17 │ import type { PromptMessage } from '@modelcontextprotocol/sdk/types.js' with {
│ ^^^^
18 │ 'resolution-mode': 'import',
19 │ };
Hi! I'm having the same. How do you fix this @yesudeep? Is there a workaround?
@stephane-segning does this block you from building code that uses Genkit?
cc: @pavelgj
No it was fine, I just skip the file concerned. But it's a pain because hte code is not cute