wutali / nextjs-netlify-blog-template

Next.js blogging template for Netlify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to compile!

FatGrizzly opened this issue · comments

I removed all the site keywords and Netlify always gives error.
Please help!

*3:53:42 PM: Creating an optimized production build...
3:53:49 PM: Failed to compile.
3:53:49 PM: 
3:53:49 PM: ./src/lib/config.ts:13:16
3:53:49 PM: Type error: Conversion of type '{ base_url: string; site_title: string; site_description: string; site_keywords: string[]; posts_per_page: number; twitter_account: string; github_account: string; }' to type 'Config' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
3:53:49 PM:   **Types of property 'site_keywords' are incompatible.**
3:53:49 PM:     Type 'string[]' is not comparable to type '{ keyword: string; }[]'.
3:53:49 PM:       Type 'string' is not comparable to type '{ keyword: string; }'.
3:53:49 PM:   11 | };*

Hi,
How did you fix the issue ? I am having the same....
Thanks!

Since I wasn't able to fix it, I gave up.

If that can be of any help, I fixed the issue by manually modifying the file config.json (in the root folder).
You simply need to respect the expected format, which will look like this :

"site_keywords": [
  {"keyword": "blog"},
  {"keyword": "some"},
  {"keyword": "stuff"}
],