marcus-grant / markipedia

My personal wikipedia made from zettelkasten notetaking system
GNU Affero General Public License v3.0
1 stars 0 forks source link

Single page build failures should skip the page instead of exiting #47

Open marcus-grant opened 1 year ago

marcus-grant commented 1 year ago

The latest netlify build fails during built-time according to this log, fix it:

10:30:21 PM: build-image version: 596993885fcc8df0dd6d507c57c5c9cb7c3a8576 (focal)
10:30:21 PM: buildbot version: dfc6fca63975e788386eb676afe6df54bd37736f
10:30:21 PM: Fetching cached dependencies
10:30:21 PM: Starting to download cache of 314.3MB
10:30:25 PM: Finished downloading cache in 4.031s
10:30:25 PM: Starting to extract cache
10:30:28 PM: Finished extracting cache in 2.655s
10:30:28 PM: Finished fetching cache in 6.741s
10:30:28 PM: Starting to prepare the repo for build
10:30:28 PM: Preparing Git Reference refs/heads/main
10:30:28 PM: Parsing package.json dependencies
10:30:29 PM: Starting to install dependencies
10:30:29 PM: Python version set to 3.8
10:30:30 PM: Attempting Ruby version 2.7.2, read from environment
10:30:30 PM: Using Ruby version 2.7.2
10:30:31 PM: Started restoring cached go cache
10:30:31 PM: Finished restoring cached go cache
10:30:31 PM: Installing Go version 1.19.5 (requested 1.19.5)
10:30:35 PM: go version go1.19.5 linux/amd64
10:30:36 PM: Using PHP version 8.0
10:30:36 PM: Started restoring cached Node.js version
10:30:37 PM: Finished restoring cached Node.js version
10:30:37 PM: v16.20.0 is already installed.
10:30:38 PM: Now using node v16.20.0 (npm v8.19.4)
10:30:38 PM: Enabling Node.js Corepack
10:30:38 PM: Started restoring cached build plugins
10:30:38 PM: Finished restoring cached build plugins
10:30:38 PM: Started restoring cached corepack dependencies
10:30:38 PM: Finished restoring cached corepack dependencies
10:30:38 PM: No npm workspaces detected
10:30:38 PM: Started restoring cached node modules
10:30:38 PM: Finished restoring cached node modules
10:30:38 PM: Installing npm packages using npm version 8.19.4
10:30:47 PM: > markipedia@1.0.0 install
10:30:47 PM: > npm install notes
10:30:53 PM: changed 1 package, and audited 516 packages in 5s
10:30:53 PM: 104 packages are looking for funding
10:30:53 PM:   run `npm fund` for details
10:30:53 PM: 2 moderate severity vulnerabilities
10:30:53 PM: To address all issues (including breaking changes), run:
10:30:53 PM:   npm audit fix --force
10:30:53 PM: Run `npm audit` for details.
10:30:53 PM: changed 1 package, and audited 516 packages in 14s
10:30:53 PM: 104 packages are looking for funding
10:30:53 PM:   run `npm fund` for details
10:30:53 PM: 2 moderate severity vulnerabilities
10:30:53 PM: To address all issues (including breaking changes), run:
10:30:53 PM:   npm audit fix --force
10:30:53 PM: Run `npm audit` for details.
10:30:53 PM: npm packages installed
10:30:53 PM: Install dependencies script success
10:30:53 PM: Starting build script
10:30:54 PM: Detected 1 framework(s)
10:30:54 PM: "eleventy" at version "1.0.2"
10:30:54 PM: Section completed: initializing
10:30:55 PM: ​
10:30:55 PM:   Netlify Build                                                 
10:30:55 PM: ────────────────────────────────────────────────────────────────
10:30:55 PM: ​
10:30:55 PM: ❯ Version
10:30:55 PM:   @netlify/build 29.9.0
10:30:55 PM: ​
10:30:55 PM: ❯ Flags
10:30:55 PM:   baseRelDir: true
10:30:55 PM:   buildId: 6435c35898ccda42a807f400
10:30:55 PM:   deployId: 6435c3589221470008c925bc
10:30:55 PM: ​
10:30:55 PM: ❯ Current directory
10:30:55 PM:   /opt/build/repo
10:30:55 PM: ​
10:30:55 PM: ❯ Config file
10:30:55 PM:   No config file was defined: using default values.
10:30:55 PM: ​
10:30:55 PM: ❯ Context
10:30:55 PM:   production
10:30:55 PM: ​
10:30:55 PM: ❯ Loading plugins
10:30:55 PM:    - @netlify/plugin-lighthouse@4.0.7 from Netlify app
10:30:57 PM: ​
10:30:57 PM:   1. Build command from Netlify app                             
10:30:57 PM: ────────────────────────────────────────────────────────────────
10:30:57 PM: ​
10:30:57 PM: $ npm run build --incremental
10:30:57 PM: > markipedia@1.0.0 build
10:30:57 PM: > npm run build:notes && npm run build:11ty && npm run build:css
10:30:57 PM: > markipedia@1.0.0 build:notes
10:30:57 PM: > npm run rm-notes; npm run install;
10:30:58 PM: > markipedia@1.0.0 rm-notes
10:30:58 PM: > rm -rf node_modules/notes
10:30:58 PM: > markipedia@1.0.0 install
10:30:58 PM: > npm install notes
10:31:05 PM: added 1 package, and audited 516 packages in 7s
10:31:05 PM: 104 packages are looking for funding
10:31:05 PM:   run `npm fund` for details
10:31:05 PM: 2 moderate severity vulnerabilities
10:31:05 PM: To address all issues (including breaking changes), run:
10:31:05 PM:   npm audit fix --force
10:31:05 PM: Run `npm audit` for details.
10:31:05 PM: > markipedia@1.0.0 build:11ty
10:31:05 PM: > ELEVENTY_PRODUCTION=true ; npx @11ty/eleventy
10:31:07 PM: [11ty] Problem writing Eleventy templates: (more in DEBUG output)
10:31:07 PM: [11ty] 1. Having trouble rendering njk template ./site/notes/java.md (via TemplateContentRenderError)
10:31:07 PM: [11ty] 2. "Dockerfile" is not a valid Prism.js language for eleventy-plugin-syntaxhighlight (via Error)
10:31:07 PM: [11ty]
10:31:07 PM: [11ty] Original error stack trace: Error: "Dockerfile" is not a valid Prism.js language for eleventy-plugin-syntaxhighlight
10:31:07 PM: [11ty]     at module.exports (/opt/build/repo/node_modules/@11ty/eleventy-plugin-syntaxhighlight/src/PrismLoader.js:20:11)
10:31:07 PM: [11ty]     at Object.highlight (/opt/build/repo/node_modules/@11ty/eleventy-plugin-syntaxhighlight/src/markdownSyntaxHighlightOptions.js:23:35)
10:31:07 PM: [11ty]     at Object.default_rules.fence (/opt/build/repo/node_modules/markdown-it/lib/renderer.js:53:27)
10:31:07 PM: [11ty]     at Renderer.render (/opt/build/repo/node_modules/markdown-it/lib/renderer.js:332:38)
10:31:07 PM: [11ty]     at MarkdownIt.render (/opt/build/repo/node_modules/markdown-it/lib/index.js:544:24)
10:31:07 PM: [11ty]     at /opt/build/repo/node_modules/@11ty/eleventy/src/Engines/Markdown.js:74:38
10:31:07 PM: [11ty]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
10:31:07 PM: [11ty]     at async Template._render (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateContent.js:432:22)
10:31:07 PM: [11ty]     at async Template.getTemplateMapContent (/opt/build/repo/node_modules/@11ty/eleventy/src/Template.js:1077:19)
10:31:07 PM: [11ty]     at async TemplateMap.populateContentDataInMap (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateMap.js:461:39)
10:31:07 PM: [11ty] Copied 38 files / Wrote 0 files in 0.80 seconds (v1.0.2)
10:31:07 PM: ​
10:31:07 PM:   "build.command" failed                                        
10:31:07 PM: ────────────────────────────────────────────────────────────────
10:31:07 PM: ​
10:31:07 PM:   Error message
10:31:07 PM:   Command failed with exit code 1: npm run build --incremental (https://ntl.fyi/exit-code-1)
10:31:07 PM: ​
10:31:07 PM:   Error location
10:31:07 PM:   In Build command from Netlify app:
10:31:07 PM:   npm run build --incremental
10:31:07 PM: ​
10:31:07 PM:   Resolved config
10:31:07 PM:   build:
10:31:07 PM:     command: npm run build --incremental
10:31:07 PM:     commandOrigin: ui
10:31:07 PM:     environment:
10:31:07 PM:       - INCOMING_HOOK_BODY
10:31:07 PM:       - INCOMING_HOOK_TITLE
10:31:07 PM:       - INCOMING_HOOK_URL
10:31:07 PM:     publish: /opt/build/repo/_site
10:31:07 PM:     publishOrigin: ui
10:31:07 PM:   plugins:
10:31:07 PM:     - inputs: {}
10:31:07 PM:       origin: ui
10:31:07 PM:       package: '@netlify/plugin-lighthouse'
10:31:07 PM: Caching artifacts
10:31:07 PM: Started saving node modules
10:31:07 PM: Finished saving node modules
10:31:07 PM: Started saving build plugins
10:31:07 PM: Finished saving build plugins
10:31:07 PM: Started saving corepack cache
10:31:07 PM: Finished saving corepack cache
10:31:07 PM: Started saving pip cache
10:31:07 PM: Finished saving pip cache
10:31:07 PM: Started saving emacs cask dependencies
10:31:07 PM: Finished saving emacs cask dependencies
10:31:07 PM: Started saving maven dependencies
10:31:07 PM: Finished saving maven dependencies
10:31:07 PM: Started saving boot dependencies
10:31:07 PM: Finished saving boot dependencies
10:31:07 PM: Started saving rust rustup cache
10:31:07 PM: Finished saving rust rustup cache
10:31:07 PM: Started saving go dependencies
10:31:09 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
10:31:07 PM: Finished saving go dependencies
10:31:09 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:31:09 PM: Failing build: Failed to build site
10:31:09 PM: Finished processing build request in 48.625s
marcus-grant commented 1 year ago

Problem arose due to the notes repository having a wrongly formatted syntax block Dockerfile instead of dockerfile. This brings up a problem of the build settings. This site should instead skip single page build fails, investigate how this can be done. I'll rename and retag the issue