Build failed with the following error

Note. - I don’t know 1 bit of code. Let me know what needs to be done if it is easy peasy. I can edit the index.js file in Atom

Below are the site details and error screenshot.

Hey @exist2021 welcome to the forums

Looking at the error, it appears some code that is meant to run in the browser is possibly running during the build process.

Are you able to share the git repository you are deploying from? This would assist in troubleshooting the cause.

Sure, here it is - GitHub - exist2021/preact-netlify

Thanks @exist2021

The issue is the tags in the content you’ve added. In the original Markdown files such as this one the tags are in the format

tags: 'technology, javascript'

while in your content files such as this one the tags are in the format

tags:
  - Tags

This is not an invalid format, but it is not what src/routes/blogs/index.js is expecting. It is specifically looking for a string that it then splits to form an Array which is then processes in this line

(blog.details.tags.substr(1, blog.details.tags.length - 2)
     .split(',') || []).map(tag => <span class={style.tag}>{tag}</span>)

The two options I see are to either change the format of the tags in your content files to work with the code, or modify the code to suit your tags.

ok, the build is gone through, thank you so much!

Another issue

The blog section is empty, Any idea why my 20 odd blogposts aren’t appearing? here is the blog - blog

I went into the content manager and see blank space - screenshot - Dropbox Capture

The issue it seems, is with the frontmatter of your markdown files.

As you can see in this file everything renders properly on GitHub, but with this file not so. The reason is the tags, because there is no space after the colon.

tags:'post modernism'

I corrected the same, but as you can see here the blog section still empty. blog

I forked your repository. Build failed as was the original issue. Post My New 555 Home Cooking Rules has wrong tag format still.

1 Like

Man, extremely sweet of you!

Now all posts are showing, thanks so much!

1 Like