oleeskild / obsidian-digital-garden

MIT License
1.41k stars 128 forks source link

Build fails after updating the template #381

Open ChristinaHyh opened 1 year ago

ChristinaHyh commented 1 year ago

I have updated the plugin to the lastest version before creating PR. However, it fails to build through netlify. The deploy log is as follows:

4:55:36 PM: Netlify Build
4:55:36 PM: ──────────────────────────────────────────────────────────────── 4:55:36 PM: ​ 4:55:36 PM: ❯ Version 4:55:36 PM: @netlify/build 29.20.12 4:55:36 PM: ​ 4:55:36 PM: ❯ Flags 4:55:36 PM: baseRelDir: true 4:55:36 PM: buildId: 64f98ff1a0fe810008ebf713 4:55:36 PM: deployId: 64f98ff1a0fe810008ebf715 4:55:36 PM: ​ 4:55:36 PM: ❯ Current directory 4:55:36 PM: /opt/build/repo 4:55:36 PM: ​ 4:55:36 PM: ❯ Config file 4:55:36 PM: /opt/build/repo/netlify.toml 4:55:36 PM: ​ 4:55:36 PM: ❯ Context 4:55:36 PM: deploy-preview 4:55:36 PM: ​ 4:55:36 PM: build.command from netlify.toml
4:55:36 PM: ──────────────────────────────────────────────────────────────── 4:55:36 PM: ​ 4:55:36 PM: $ npm install && npm run build 4:55:37 PM: up to date, audited 488 packages in 794ms 4:55:37 PM: 119 packages are looking for funding 4:55:37 PM: run npm fund for details 4:55:37 PM: 1 moderate severity vulnerability 4:55:37 PM: To address all issues, run: 4:55:37 PM: npm audit fix 4:55:37 PM: Run npm audit for details. 4:55:38 PM: > web@1.0.0 build 4:55:38 PM: > npm-run-all get-theme build:* 4:55:38 PM: > web@1.0.0 get-theme 4:55:38 PM: > node src/site/get-theme.js 4:55:38 PM: > web@1.0.0 build:eleventy 4:55:38 PM: > cross-env ELEVENTY_ENV=prod NODE_OPTIONS=--max-old-space-size=4096 eleventy 4:55:40 PM: [11ty] Writing dist/404/index.html from ./src/site/404.njk 4:55:40 PM: [11ty] Writing dist/feed.xml from ./src/site/feed.njk 4:55:40 PM: [11ty] Writing dist/graph.json from ./src/site/graph.njk 4:55:40 PM: [11ty] Writing dist/searchIndex.json from ./src/site/search-index.njk 4:55:40 PM: [11ty] Writing dist/sitemap.xml from ./src/site/sitemap.njk 4:55:40 PM: [11ty] Problem writing Eleventy templates: (more in DEBUG output) 4:55:40 PM: [11ty] 1. Having trouble writing to dist/sapere-aude/russkij/urok-0/index.html from ./src/site/notes/Sapere Aude/多语习者录/Русский/Урок 0 前言与目录.md (via EleventyTemplateError) 4:55:40 PM: [11ty] 2. (./src/site/_includes/layouts/note.njk) 4:55:40 PM: [11ty] Template render error: (/opt/build/repo/src/site/_includes/components/pageheader.njk) 4:55:40 PM: [11ty] EleventyShortcodeError: Error with Nunjucks shortcode favicons (via Template render error) 4:55:40 PM: [11ty] 3. Expected number between 1 and 100000 for density but received 0.5760000000000001 of type number (via Template render error) 4:55:40 PM: [11ty] 4:55:40 PM: [11ty] Original error stack trace: Error: Expected number between 1 and 100000 for density but received 0.5760000000000001 of type number 4:55:40 PM: [11ty] at Object.invalidParameterError (/opt/build/repo/node_modules/eleventy-plugin-gen-favicons/node_modules/sharp/lib/is.js:124:10) 4:55:40 PM: [11ty] at Sharp._createInputDescriptor (/opt/build/repo/node_modules/eleventy-plugin-gen-favicons/node_modules/sharp/lib/input.js:92:18) 4:55:40 PM: [11ty] at new Sharp (/opt/build/repo/node_modules/eleventy-plugin-gen-favicons/node_modules/sharp/lib/constructor.js:341:29) 4:55:40 PM: [11ty] at Sharp (/opt/build/repo/node_modules/eleventy-plugin-gen-favicons/node_modules/sharp/lib/constructor.js:169:12) 4:55:40 PM: [11ty] at resizedSharp (/opt/build/repo/node_modules/eleventy-plugin-gen-favicons/favicon-gen.js:34:10) 4:55:40 PM: [11ty] at /opt/build/repo/node_modules/eleventy-plugin-gen-favicons/favicon-gen.js:41:33 4:55:40 PM: [11ty] at Array.map () 4:55:40 PM: [11ty] at icoBuf (/opt/build/repo/node_modules/eleventy-plugin-gen-favicons/favicon-gen.js:41:20) 4:55:40 PM: [11ty] at module.exports (/opt/build/repo/node_modules/eleventy-plugin-gen-favicons/favicon-gen.js:92:7) 4:55:40 PM: [11ty] at async Object. (/opt/build/repo/node_modules/eleventy-plugin-gen-favicons/index.js:25:28) 4:55:40 PM: [11ty] Benchmark 109ms 12% 1× (Data) ./src/site/_data/dynamics.js 4:55:40 PM: [11ty] Copied 1 file / Wrote 0 files in 0.55 seconds (v2.0.1) 4:55:41 PM: ERROR: build:eleventy exited with 1. 4:55:41 PM: ​ 4:55:41 PM: build.command failed
4:55:41 PM: ──────────────────────────────────────────────────────────────── 4:55:41 PM: ​ 4:55:41 PM: Error message 4:55:41 PM: Command failed with exit code 1: npm install && npm run build (https://ntl.fyi/exit-code-1) 4:55:41 PM: ​ 4:55:41 PM: Error location 4:55:41 PM: In build.command from netlify.toml: 4:55:41 PM: npm install && npm run build 4:55:41 PM: ​ 4:55:41 PM: Resolved config 4:55:41 PM: build: 4:55:41 PM: command: npm install && npm run build 4:55:41 PM: commandOrigin: config 4:55:41 PM: environment: 4:55:41 PM: - REVIEW_ID 4:55:41 PM: publish: /opt/build/repo/dist 4:55:41 PM: publishOrigin: config 4:55:41 PM: functionsDirectory: /opt/build/repo/netlify/functions 4:55:41 PM: redirects: 4:55:42 PM: Build failed due to a user error: Build script returned non-zero exit code: 2 4:55:42 PM: Failing build: Failed to build site 4:55:42 PM: Finished processing build request in 27.756s

I don't know how to solve it, can you help me to find the problems and guide me how to solve this? Thank you.

oleeskild commented 1 year ago

From your error log it seems like there is something weird going on with the file "Sapere Aude/多语习者录/Русский/Урок 0 前言与目录.md". Try deleting it by removing the dg-publish: true, and then use the "Delete notes from garden" button in the publication center.

Let me know if that fixes it.

ChristinaHyh commented 1 year ago

Hi, it can't work. The error log shows the same problem with other files. If I delete one post and another one will show the same error.

2023-09-08_104140 2023-09-08_104130

ChristinaHyh commented 1 year ago

I found that versions after template 1.50.1 cannot be deployed on Netlify.

VenturaNotes commented 11 months ago

I've been able to deploy template 1.59.0 on Netlify so it may have been fixed in the latest update. My current digital garden is stored in my repository "MyNotes".