analogjs / analog

The fullstack meta-framework for Angular. Powered by Vite and Nitro
https://analogjs.org
MIT License
2.5k stars 240 forks source link

Analog Markdown is throwing error #377

Closed bloodred17 closed 1 year ago

bloodred17 commented 1 year ago

Please provide the environment you discovered this bug in.

Local environment. Development server

MacOS Ventura

Which area/package is the issue in?

content

Description

I'm getting error when I am doing

import {provideContent, withMarkdownRenderer} from "@analogjs/content";

export const mainProviders = [
  provideContent(withMarkdownRenderer())
];

and running in developer mode. But it is building fine without errors. I was able to bypass it by building from time to time and then starting the development server. However this time it keeps throwing this error

Please provide the exception or error you saw

TS2344: Type '{ content: { alias: "content"; required: false; }; classes: { alias: "classes"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'.

Property '"content"' is incompatible with index signature.
    Type '{ alias: "content"; required: false; }' is not assignable to type 'string'. [plugin angular-compiler]

    node_modules/@analogjs/content/lib/markdown.component.d.ts:20:94:
      20 │ ...own", never, { "content": { "alias": "content"; "required": fal...
         ╵              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Other information

No response

I would be willing to submit a PR to fix this issue

brandonroberts commented 1 year ago

Thanks @bloodred17. Can you provide a small GitHub repo that shows the issue?

brandonroberts commented 1 year ago

You can add skipLibCheck: true to your tsconfig.app.json to work around this