datopian / flowershow

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

Error when deploying files on Vercel #603

Closed Joehairr closed 11 months ago

Joehairr commented 11 months ago

first time using flowershow, i'm a tech noob so go easy on me. Publishing works fine, i can see my files in the github repo, but when vercel tries deploying the files. It spits out an error

log :

[09:21:25.014] Running build in Washington, D.C., USA (East) – iad1
[09:21:25.152] Cloning github.com/Joehairr/notulen-zachir (Branch: main, Commit: 669adee)
[09:21:25.548] Cloning completed: 395.045ms
[09:21:33.005] Restored build cache
[09:21:33.121] Running "vercel build"
[09:21:34.154] Vercel CLI 32.6.1
[09:21:35.151] Running "install" command: `npm install`...
[09:21:36.970] npm WARN ERESOLVE overriding peer dependency
[09:21:36.971] npm WARN While resolving: react-virtual@2.10.4
[09:21:36.972] npm WARN Found: react@18.2.0
[09:21:36.972] npm WARN node_modules/react
[09:21:36.972] npm WARN   react@"^18.2.0" from the root project
[09:21:36.972] npm WARN   22 more (@docsearch/react, @floating-ui/react-dom, ...)
[09:21:36.972] npm WARN 
[09:21:36.973] npm WARN Could not resolve dependency:
[09:21:36.973] npm WARN peer react@"^16.6.3 || ^17.0.0" from react-virtual@2.10.4
[09:21:36.973] npm WARN node_modules/kbar/node_modules/react-virtual
[09:21:36.973] npm WARN   react-virtual@"^2.8.2" from kbar@0.1.0-beta.40
[09:21:36.974] npm WARN   node_modules/kbar
[09:21:36.974] npm WARN 
[09:21:36.974] npm WARN Conflicting peer dependency: react@17.0.2
[09:21:36.974] npm WARN node_modules/react
[09:21:36.974] npm WARN   peer react@"^16.6.3 || ^17.0.0" from react-virtual@2.10.4
[09:21:36.975] npm WARN   node_modules/kbar/node_modules/react-virtual
[09:21:36.975] npm WARN     react-virtual@"^2.8.2" from kbar@0.1.0-beta.40
[09:21:36.975] npm WARN     node_modules/kbar
[09:21:38.708] 
[09:21:38.708] up to date, audited 831 packages in 3s
[09:21:38.708] 
[09:21:38.708] 258 packages are looking for funding
[09:21:38.708]   run `npm fund` for details
[09:21:38.740] 
[09:21:38.740] 2 moderate severity vulnerabilities
[09:21:38.740] 
[09:21:38.741] To address all issues, run:
[09:21:38.741]   npm audit fix --force
[09:21:38.741] 
[09:21:38.741] Run `npm audit` for details.
[09:21:38.770] Detected Next.js version: 13.3.0
[09:21:38.771] Running "npm run export"
[09:21:39.095] 
[09:21:39.095] > flowershow@2.0.3 export
[09:21:39.095] > npm run build && next export
[09:21:39.096] 
[09:21:39.420] 
[09:21:39.420] > flowershow@2.0.3 prebuild
[09:21:39.420] > npm run generate
[09:21:39.420] 
[09:21:39.742] 
[09:21:39.742] > flowershow@2.0.3 generate
[09:21:39.743] > cross-env NODE_OPTIONS="--experimental-json-modules --experimental-modules" node -r esbuild-register ./scripts/prebuild.mjs
[09:21:39.743] 
[09:21:40.460] 
[09:21:40.460] > flowershow@2.0.3 build
[09:21:40.460] > next build
[09:21:40.460] 
[09:21:40.985] info  - Skipping linting
[09:21:40.986] info  - Checking validity of types...
[09:21:43.826] info  - Creating an optimized production build...
[09:22:07.713] info  - Compiled successfully
[09:22:07.724] info  - Collecting page data...
[09:22:11.702] info  - Generating static pages (0/7)
[09:22:11.991] info  - Generating static pages (1/7)
[09:22:12.002] info  - Generating static pages (3/7)
[09:22:12.032] info  - Generating static pages (5/7)
[09:22:12.086] SyntaxError: Arg string terminates parameters early
[09:22:12.086]     at new Function (<anonymous>)
[09:22:12.089]     at file:///vercel/path0/node_modules/next-mdx-remote/dist/index.js:64:35
[09:22:12.089]     at Object.Kc [as useMemo] (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:60:240)
[09:22:12.089]     at exports.useMemo (/vercel/path0/node_modules/react/cjs/react.production.min.js:25:208)
[09:22:12.089]     at MDXRemote (file:///vercel/path0/node_modules/next-mdx-remote/dist/index.js:52:21)
[09:22:12.089]     at Wc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
[09:22:12.089]     at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
[09:22:12.090]     at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
[09:22:12.097]     at $c (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
[09:22:12.097]     at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:71:145)
[09:22:12.097] 
[09:22:12.098] Error occurred prerendering page "/Links/University notes". Read more: https://nextjs.org/docs/messages/prerender-error
[09:22:12.098] SyntaxError: Arg string terminates parameters early
[09:22:12.098]     at new Function (<anonymous>)
[09:22:12.098]     at file:///vercel/path0/node_modules/next-mdx-remote/dist/index.js:64:35
[09:22:12.098]     at Object.Kc [as useMemo] (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:60:240)
[09:22:12.098]     at exports.useMemo (/vercel/path0/node_modules/react/cjs/react.production.min.js:25:208)
[09:22:12.098]     at MDXRemote (file:///vercel/path0/node_modules/next-mdx-remote/dist/index.js:52:21)
[09:22:12.098]     at Wc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
[09:22:12.098]     at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
[09:22:12.098]     at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
[09:22:12.098]     at $c (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
[09:22:12.098]     at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:71:145)
[09:22:12.099] 
[09:22:12.099] > Export encountered errors on following paths:
[09:22:12.099]  /[[...slug]]: /Links/University notes
[09:22:12.099] info  - Generating static pages (7/7)
[09:22:12.141] Error: Command "npm run export" exited with 1
[09:22:12.542] 
rufuspollock commented 11 months ago

@Joehairr there's something in /Links/University notes file. Is there anything html like or < or > in the file? If so remove that for now and see if it works ...

rufuspollock commented 11 months ago

FIXED. @Joehairr closing as i think we've identified your issue.

Joehairr commented 11 months ago

@Joehairr there's something in /Links/University notes file. Is there anything html like or < or > in the file? If so remove that for now and see if it works ...

No there is nothing like that. It looks like this IMG-20231215-WA0007.jpg

mohamedsalem401 commented 11 months ago

I managed to reproduce it. Flowershow fails to process front-matter fields with - like dg-publish and dg-home in the file you provided.

image

I tested parsing the file with MarkdownDB and it works fine, the issue has to do with Flowershow itself.

rufuspollock commented 11 months ago

FIXED. We identified this is frontmatter.

AsmodaiP commented 7 months ago

This error occure again

mohamedsalem401 commented 7 months ago

Hey @AsmodaiP, Please check if any of the files in the content folder contain any MDX syntax errors.