datopian / flowershow

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

`npm run generate` broken in @flowershow/remark-wiki-link@1.0.1 - TypeError: getFiles is not a function #463

Closed rdimaio closed 1 year ago

rdimaio commented 1 year ago

Describe the bug When I run npm run generate in .flowershow, I get:

npm run generate                                                                                            

> @flowershow/template@1.0.1 generate
> contentlayer build && cross-env NODE_OPTIONS="--experimental-json-modules --experimental-modules" node -r esbuild-register ./scripts/postbuild.mjs

TypeError: getFiles is not a function
    at _callee$ (file:///Users/rdm/Documents/tech/majula/.flowershow/node_modules/@flowershow/remark-wiki-link/index2.js:771:46)
    at tryCatch (file:///Users/rdm/Documents/tech/majula/.flowershow/node_modules/@flowershow/remark-wiki-link/index2.js:92:17)
    at Generator.<anonymous> (file:///Users/rdm/Documents/tech/majula/.flowershow/node_modules/@flowershow/remark-wiki-link/index2.js:173:22)
    at Generator.next (file:///Users/rdm/Documents/tech/majula/.flowershow/node_modules/@flowershow/remark-wiki-link/index2.js:117:21)
    at asyncGeneratorStep (file:///Users/rdm/Documents/tech/majula/.flowershow/node_modules/@flowershow/remark-wiki-link/index2.js:354:24)
    at _next (file:///Users/rdm/Documents/tech/majula/.flowershow/node_modules/@flowershow/remark-wiki-link/index2.js:373:9)

After I uninstalled @flowershow/remark-wiki-link@1.0.1 and installed @flowershow/remark-wiki-link@1.0.0, the script executed successfully.

I believe the issue stems from this commit: https://github.com/flowershow/flowershow/commit/ae2bf0d9a045486e9a2e1b9fdf17688d5c7053e4

To Reproduce Steps to reproduce the behavior:

  1. Go to .flowershow
  2. Run npm run generate

Expected behavior

Desktop (please complete the following information):

rufuspollock commented 1 year ago

@rdimaio thanks for reporting. @olayway can you take a look?

olayway commented 1 year ago

Working on it!

olayway commented 1 year ago

@rdimaio this has been fixed in the latest Flowershow template version. Can you try running npx flowershow@latest install once again and let me know if you still encounter any issues?