datopian / flowershow

💐 Publish your obsidian digital garden or any markdown site easily and elegantly.
https://flowershow.app/
MIT License
750 stars 92 forks source link

Obsidian-style tags list causes TypeError: tags.forEach is not a function #543

Closed ewoolsey closed 11 months ago

ewoolsey commented 11 months ago

Repo This is my first time trying flowershow. Looks awesome but didn't work for me.

logs:

Running build in San Francisco, USA (West) – sfo1
--
Cloning github.com/ewoolsey/Keefers-campaign (Branch: main, Commit: 996719e)
Cloning completed: 1.069s
Restored build cache
Running "vercel build"
Vercel CLI 31.2.2
Running "install" command: `npm install`...
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-virtual@2.10.4
npm WARN Found: react@18.2.0
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   22 more (@docsearch/react, @floating-ui/react-dom, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.6.3 \|\| ^17.0.0" from react-virtual@2.10.4
npm WARN node_modules/kbar/node_modules/react-virtual
npm WARN   react-virtual@"^2.8.2" from kbar@0.1.0-beta.40
npm WARN   node_modules/kbar
npm WARN
npm WARN Conflicting peer dependency: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@"^16.6.3 \|\| ^17.0.0" from react-virtual@2.10.4
npm WARN   node_modules/kbar/node_modules/react-virtual
npm WARN     react-virtual@"^2.8.2" from kbar@0.1.0-beta.40
npm WARN     node_modules/kbar
 
up to date, audited 605 packages in 1s
 
190 packages are looking for funding
run `npm fund` for details
 
found 0 vulnerabilities
Detected Next.js version: 13.3.0
Running "npm run export"
 
> flowershow@2.0.3 export
> npm run build && next export
 
 
> flowershow@2.0.3 prebuild
> npm run generate
 
 
> flowershow@2.0.3 generate
> cross-env NODE_OPTIONS="--experimental-json-modules --experimental-modules" node -r esbuild-register ./scripts/prebuild.mjs
 
file:///vercel/path0/node_modules/mddb/dist/src/lib/markdowndb.js:102
tags.forEach((tag) => {
^
 
TypeError: tags.forEach is not a function
at MarkdownDB.indexFolder (file:///vercel/path0/node_modules/mddb/dist/src/lib/markdowndb.js:102:18)
at async mddb (file:///vercel/path0/scripts/mddb.mjs:10:3)
at async file:///vercel/path0/scripts/prebuild.mjs:5:1
 
Node.js v18.16.1
Error: Command "npm run export" exited with 1
olayway commented 11 months ago

@ewoolsey I'm looking into it, thanks for reporting!

olayway commented 11 months ago

@ewoolsey This has just been fixed. Thanks again for letting us know about this issue! 🌷 Now, based on the commits in your repo it looks like you're using our Obsidian plugin to publish your notes! 🤩 Since we don't yet have an upgrade system in place you have the following options to upgrade to the latest Flowershow:

  1. If you're comfortable with working in the terminal, you could just manually upgrade mddb dependency to ˆ0.2.1..
  2. If you're not, you'd need to remove your repo and your Vercel project, then copy and deploy with Vercel once again, and then republish your notes.

Btw, I've tested building your repo locally after upgrading to the latest Flowershow but there is one last issue you'll need to address to make the site build - the template in your /Templates/Region.md file. Flowershow currently doesn't support Obsidian templater plugin (nor any other plugins), so this will currently throw an error. You can just mark this file as draft by adding the following frontmatter at the beginning of your note to get rid of the error:

---
isDraft: true
---

Now, your site will build correctly.

ewoolsey commented 11 months ago

Thanks so much for your quick response and hard work! Excited to try this out again. Really appreciate that. I'll be sure to test it out in the next day or two here when I have a spare second.