Deploy details
Your deploy failed due to an errorDeploy failed for svelte-pdf
feat: Refactor PDF viewer for improved performance and accessibility This commit refactors the PDF viewer component to address several issues, including incorrect page rendering, auto-flip functionality, and accessibility concerns. Key changes: - **Unified page number variable:** Replaced separate `pageNum` and `page_num` variables with a single `currentPage` variable for clarity and consistency. This fixes the issue where the displayed page number would get out of sync with the actual rendered page. - **Corrected page rendering logic:** Simplified the `queueRenderPage` and `renderPage` functions, removing the complex `pageNumPending` logic and ensuring pages are rendered in the correct order. Added a bounds check to prevent rendering non-existent pages. - **Fixed auto-flip functionality:** Corrected the `onPageTurn` function to use the updated `onNextPage` logic and ensure proper page transitions during auto-flip. - **Improved accessibility:** Added `aria-label` attributes to icon-only buttons to enhance accessibility for screen reader users. This addresses the accessibility warnings. - **Corrected canvas tag usage:** Changed self-closing canvas tags to proper opening and closing tags to resolve HTML validity issues. - **Removed unnecessary $: if (isInitialized) block:** The rendering is now correctly handled within `initialLoad` and the navigation functions. These changes result in a more robust, performant, and accessible PDF viewer component.Production: master@f51093b
Deploy log
Initializing
Complete
Initializing
Complete
10:14:22 AM: Build ready to start
10:14:34 AM: build-image version: 9c9fb6952e50bb092d4b66daf2368677e5c68e34 (focal)
10:14:34 AM: buildbot version: 9c9fb6952e50bb092d4b66daf2368677e5c68e34
10:14:35 AM: Fetching cached dependencies
10:14:35 AM: Failed to fetch cache, continuing with build
10:14:35 AM: Starting to prepare the repo for build
10:14:35 AM: No cached dependencies found. Cloning fresh repo
10:14:35 AM: git clone --filter=blob:none https://github.com/vinodnimbalkar/svelte-pdf
10:14:35 AM: Preparing Git Reference refs/heads/master
10:14:37 AM: Starting to install dependencies
10:14:38 AM: mise python@3.13.2 install
10:14:38 AM: mise python@3.13.2 download cpython-3.13.2+20250205-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
10:14:38 AM: mise python@3.13.2 extract cpython-3.13.2+20250205-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
10:14:38 AM: mise python@3.13.2 python --version
10:14:38 AM: mise python@3.13.2 Python 3.13.2
10:14:38 AM: mise python@3.13.2 ✓ installed
10:14:38 AM: Python version set to 3.13
10:14:40 AM: Collecting pipenv
10:14:40 AM: Downloading pipenv-2024.4.1-py3-none-any.whl.metadata (17 kB)
10:14:40 AM: Collecting certifi (from pipenv)
10:14:40 AM: Downloading certifi-2025.1.31-py3-none-any.whl.metadata (2.5 kB)
10:14:40 AM: Collecting packaging>=22 (from pipenv)
10:14:40 AM: Downloading packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
10:14:40 AM: Collecting setuptools>=67 (from pipenv)
10:14:40 AM: Downloading setuptools-75.8.0-py3-none-any.whl.metadata (6.7 kB)
10:14:40 AM: Collecting virtualenv>=20.24.2 (from pipenv)
10:14:40 AM: Downloading virtualenv-20.29.1-py3-none-any.whl.metadata (4.5 kB)
10:14:40 AM: Collecting distlib<1,>=0.3.7 (from virtualenv>=20.24.2->pipenv)
10:14:40 AM: Downloading distlib-0.3.9-py2.py3-none-any.whl.metadata (5.2 kB)
10:14:40 AM: Collecting filelock<4,>=3.12.2 (from virtualenv>=20.24.2->pipenv)
10:14:40 AM: Downloading filelock-3.17.0-py3-none-any.whl.metadata (2.9 kB)
10:14:40 AM: Collecting platformdirs<5,>=3.9.1 (from virtualenv>=20.24.2->pipenv)
10:14:40 AM: Downloading platformdirs-4.3.6-py3-none-any.whl.metadata (11 kB)
10:14:40 AM: Downloading pipenv-2024.4.1-py3-none-any.whl (3.0 MB)
10:14:40 AM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 66.2 MB/s eta 0:00:00
10:14:40 AM: Downloading packaging-24.2-py3-none-any.whl (65 kB)
10:14:40 AM: Downloading setuptools-75.8.0-py3-none-any.whl (1.2 MB)
10:14:41 AM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 38.8 MB/s eta 0:00:00
10:14:41 AM: Downloading virtualenv-20.29.1-py3-none-any.whl (4.3 MB)
10:14:41 AM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 106.9 MB/s eta 0:00:00
10:14:41 AM: Downloading certifi-2025.1.31-py3-none-any.whl (166 kB)
10:14:41 AM: Downloading distlib-0.3.9-py2.py3-none-any.whl (468 kB)
10:14:41 AM: Downloading filelock-3.17.0-py3-none-any.whl (16 kB)
10:14:41 AM: Downloading platformdirs-4.3.6-py3-none-any.whl (18 kB)
10:14:41 AM: Installing collected packages: distlib, setuptools, platformdirs, packaging, filelock, certifi, virtualenv, pipenv
10:14:43 AM: Successfully installed certifi-2025.1.31 distlib-0.3.9 filelock-3.17.0 packaging-24.2 pipenv-2024.4.1 platformdirs-4.3.6 setuptools-75.8.0 virtualenv-20.29.1
10:14:43 AM: [notice] A new release of pip is available: 24.3.1 -> 25.0
10:14:43 AM: [notice] To update, run: pip install --upgrade pip
10:14:43 AM: Attempting Ruby version 2.6.2, read from environment
10:14:44 AM: Required ruby-2.6.2 is not installed - installing.
10:14:44 AM: Searching for binary rubies, this might take some time.
10:14:44 AM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/20.04/x86_64/ruby-2.6.2.tar.bz2
10:14:44 AM: Checking requirements for ubuntu.
10:14:45 AM: Requirements installation successful.
10:14:45 AM: ruby-2.6.2 - #configure
10:14:45 AM: ruby-2.6.2 - #download
10:14:45 AM: ruby-2.6.2 - #validate archive
10:14:48 AM: ruby-2.6.2 - #extract
10:14:50 AM: ruby-2.6.2 - #validate binary
10:14:50 AM: ruby-2.6.2 - #setup
10:14:51 AM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2@global
10:14:51 AM: ruby-2.6.2 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
10:14:51 AM: ruby-2.6.2 - #generating global wrappers........
10:14:51 AM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2
10:14:51 AM: ruby-2.6.2 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
10:14:52 AM: ruby-2.6.2 - #generating default wrappers........
10:14:52 AM: Using /opt/buildhome/.rvm/gems/ruby-2.6.2
10:14:52 AM: Using Ruby version 2.6.2
10:14:53 AM: Started restoring cached go cache
10:14:53 AM: Finished restoring cached go cache
10:14:53 AM: Installing Go version 1.12 (requested 1.12)
10:14:57 AM: go version go1.12 linux/amd64
10:14:58 AM: Using PHP version 8.0
10:15:00 AM: v18.20.6 is already installed.
10:15:00 AM: Now using node v18.20.6 (npm v10.8.2)
10:15:00 AM: Enabling Node.js Corepack
10:15:00 AM: Started restoring cached build plugins
10:15:00 AM: Finished restoring cached build plugins
10:15:00 AM: Started restoring cached corepack dependencies
10:15:00 AM: Finished restoring cached corepack dependencies
10:15:01 AM: No pnpm workspaces detected
10:15:01 AM: Started restoring cached node modules
10:15:01 AM: Finished restoring cached node modules
10:15:01 AM: Installing npm packages using pnpm version 9.15.4
10:15:02 AM: Lockfile is up to date, resolution step is skipped
10:15:02 AM: Progress: resolved 1, reused 0, downloaded 0, added 0
10:15:02 AM: Packages: +197
10:15:02 AM: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10:15:03 AM: Progress: resolved 197, reused 0, downloaded 0, added 0
10:15:04 AM: Progress: resolved 197, reused 0, downloaded 193, added 193
10:15:04 AM: Progress: resolved 197, reused 0, downloaded 197, added 197, done
10:15:04 AM: .../esbuild@0.21.5/node_modules/esbuild postinstall$ node install.js
10:15:04 AM: .../node_modules/svelte-preprocess postinstall$ echo "[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc..."
10:15:04 AM: .../node_modules/svelte-preprocess postinstall: [svelte-preprocess] Don't forget to install the preprocessors packages that will be used: sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc...
.../node_modules/svelte-preprocess postinstall: Done
.../node_modules/svelte-preprocess postinstall: Done
10:15:04 AM: .../esbuild@0.21.5/node_modules/esbuild postinstall: Done
10:15:04 AM: dependencies:
10:15:04 AM: + @sveltejs/vite-plugin-svelte 3.1.2
10:15:04 AM: + pdfjs-dist 4.10.38
10:15:04 AM: devDependencies:
10:15:04 AM: + @sveltejs/adapter-auto 2.1.1
10:15:04 AM: + @sveltejs/kit 2.17.1
10:15:04 AM: + @sveltejs/package 2.3.10
10:15:04 AM: + eslint 9.20.0
10:15:04 AM: + eslint-config-prettier 10.0.1
10:15:04 AM: + eslint-plugin-svelte 2.46.1
10:15:04 AM: + prettier 3.4.2
10:15:04 AM: + prettier-plugin-svelte 3.3.3
10:15:04 AM: + svelte 5.19.9
10:15:04 AM: + svelte-check 3.8.6
10:15:04 AM: + svelte2tsx 0.7.34
10:15:04 AM: + typescript 5.7.3
10:15:04 AM: + vite 5.4.14
10:15:04 AM: Done in 3s
10:15:05 AM: npm packages installed using pnpm
10:15:05 AM: Successfully installed dependencies
10:15:05 AM: Starting build script
10:15:07 AM: Detected 1 framework(s)
10:15:07 AM: "svelte-kit" at version "2.17.1"
10:15:07 AM: Section completed: initializing
Building
Complete
Building
Complete
10:15:08 AM: Netlify Build
10:15:08 AM: ────────────────────────────────────────────────────────────────
10:15:08 AM:
10:15:08 AM: ❯ Version
10:15:08 AM: @netlify/build 29.58.9
10:15:08 AM:
10:15:08 AM: ❯ Flags
10:15:08 AM: accountId: 5e7cbd7216195274971d45b5
10:15:08 AM: baseRelDir: true
10:15:08 AM: buildId: 67a87ffe7adb5c000893e5a6
10:15:08 AM: deployId: 67a87ffe7adb5c000893e5a8
10:15:08 AM:
10:15:08 AM: ❯ Current directory
10:15:08 AM: /opt/build/repo
10:15:08 AM:
10:15:08 AM: ❯ Config file
10:15:08 AM: No config file was defined: using default values.
10:15:08 AM:
10:15:08 AM: ❯ Context
10:15:08 AM: production
10:15:08 AM:
10:15:08 AM: Build command from Netlify app
10:15:08 AM: ────────────────────────────────────────────────────────────────
10:15:08 AM:
10:15:08 AM: $ npm run build
10:15:08 AM: > svelte-pdf@1.0.25 build
10:15:08 AM: > vite build
10:15:08 AM: ▲ [WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]
10:15:08 AM: jsconfig.json:2:13:
10:15:08 AM: 2 │ "extends": "./.svelte-kit/tsconfig.json",
10:15:08 AM: ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10:15:09 AM: 10:15:09 AM [vite-plugin-svelte] You are using Svelte 5.19.9 with vite-plugin-svelte@3. Active Svelte 5 support has moved to vite-plugin-svelte@4.
10:15:09 AM: To receive bug fixes and new features update your devDependencies to "@sveltejs/vite-plugin-svelte": "^4.0.0-next.6" and install.
10:15:09 AM: For framework integrations that depend on it, you might have to add an override:
10:15:09 AM: "overrides": {"@sveltejs/vite-plugin-svelte": "^4.0.0-next.6"}
10:15:09 AM: vite v5.4.14 building SSR bundle for production...
10:15:09 AM: transforming...
10:15:10 AM: ✓ 176 modules transformed.
10:15:10 AM: rendering chunks...
10:15:10 AM: 10:15:10 AM [vite-plugin-svelte] You are using Svelte 5.19.9 with vite-plugin-svelte@3. Active Svelte 5 support has moved to vite-plugin-svelte@4.
10:15:10 AM: To receive bug fixes and new features update your devDependencies to "@sveltejs/vite-plugin-svelte": "^4.0.0-next.6" and install.
10:15:10 AM: For framework integrations that depend on it, you might have to add an override:
10:15:10 AM: "overrides": {"@sveltejs/vite-plugin-svelte": "^4.0.0-next.6"}
10:15:10 AM: vite v5.4.14 building for production...
10:15:10 AM: transforming...
10:15:12 AM: ✓ 141 modules transformed.
10:15:12 AM: rendering chunks...
10:15:12 AM: computing gzip size...
10:15:12 AM: .svelte-kit/output/client/_app/version.json 0.03 kB │ gzip: 0.05 kB
10:15:12 AM: .svelte-kit/output/client/.vite/manifest.json 3.58 kB │ gzip: 0.70 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/assets/pdf.worker.BgryrOlp.mjs 2,209.73 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/assets/2.B2DuIo8B.css 4.14 kB │ gzip: 1.01 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/entry/start.ExYv5EBM.js 0.06 kB │ gzip: 0.08 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/nodes/0.BRjFTiiU.js 0.33 kB │ gzip: 0.24 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/chunks/I7Iq44MJ.js 0.37 kB │ gzip: 0.27 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/chunks/BkQIuD3J.js 0.53 kB │ gzip: 0.34 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/nodes/1.Da2ldHSd.js 0.56 kB │ gzip: 0.35 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/chunks/P77Y22Gb.js 1.15 kB │ gzip: 0.62 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/chunks/Cmv2lCNx.js 3.40 kB │ gzip: 1.70 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/chunks/DqBxV95t.js 3.96 kB │ gzip: 1.89 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/entry/app.RhxYzYO6.js 5.10 kB │ gzip: 2.46 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/chunks/CBHZSftJ.js 13.18 kB │ gzip: 5.41 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/chunks/DpDqdPD8.js 30.12 kB │ gzip: 11.90 kB
10:15:12 AM: .svelte-kit/output/client/_app/immutable/nodes/2.BG9PrZrk.js 354.24 kB │ gzip: 105.87 kB
10:15:12 AM: ✓ built in 1.72s
10:15:12 AM: .svelte-kit/output/server/.vite/manifest.json 2.76 kB
10:15:12 AM: .svelte-kit/output/server/_app/immutable/assets/_page.B2DuIo8B.css 4.14 kB
10:15:12 AM: .svelte-kit/output/server/entries/fallbacks/layout.svelte.js 0.16 kB
10:15:12 AM: .svelte-kit/output/server/internal.js 0.31 kB
10:15:12 AM: .svelte-kit/output/server/chunks/equality.js 0.33 kB
10:15:12 AM: .svelte-kit/output/server/chunks/escaping.js 0.53 kB
10:15:12 AM: .svelte-kit/output/server/entries/fallbacks/error.svelte.js 1.47 kB
10:15:12 AM: .svelte-kit/output/server/chunks/index.js 3.60 kB
10:15:12 AM: .svelte-kit/output/server/chunks/exports.js 6.90 kB
10:15:12 AM: .svelte-kit/output/server/entries/pages/_page.svelte.js 18.23 kB
10:15:12 AM: .svelte-kit/output/server/chunks/internal.js 42.46 kB
10:15:12 AM: .svelte-kit/output/server/index.js 125.29 kB
10:15:12 AM: ✓ built in 2.89s
10:15:12 AM: Run npm run preview to preview your production build locally.
10:15:12 AM:
10:15:12 AM: > Using @sveltejs/adapter-auto
10:15:12 AM: Installing @sveltejs/adapter-netlify...
10:15:13 AM: Progress: resolved 0, reused 1, downloaded 0, added 0
10:15:14 AM: Progress: resolved 221, reused 192, downloaded 3, added 0
10:15:15 AM: Progress: resolved 266, reused 196, downloaded 4, added 0
10:15:15 AM: WARN 3 deprecated subdependencies found: glob@7.2.3, inflight@1.0.6, rimraf@2.7.1
10:15:15 AM: Packages: +4
10:15:15 AM: ++++
10:15:15 AM: Progress: resolved 270, reused 197, downloaded 4, added 4, done
10:15:15 AM: .../esbuild@0.18.20/node_modules/esbuild postinstall$ node install.js
10:15:15 AM: .../esbuild@0.18.20/node_modules/esbuild postinstall: Done
10:15:16 AM: devDependencies:
10:15:16 AM: + @sveltejs/adapter-netlify 2.0.8 (4.4.1 is available)
10:15:16 AM: WARN Issues with peer dependencies found
10:15:16 AM: .
10:15:16 AM: ├─┬ @sveltejs/vite-plugin-svelte 3.1.2
10:15:16 AM: │ └─┬ svelte-hmr 0.16.0
10:15:16 AM: │ └── ✕ unmet peer svelte@"^3.19.0 || ^4.0.0": found 5.19.9
10:15:16 AM: ├─┬ @sveltejs/adapter-netlify 2.0.8
10:15:16 AM: │ └── ✕ unmet peer @sveltejs/kit@^1.5.0: found 2.17.1
10:15:16 AM: └─┬ @sveltejs/adapter-auto 2.1.1
10:15:16 AM: └── ✕ unmet peer @sveltejs/kit@^1.0.0: found 2.17.1
10:15:16 AM: Done in 3.3s
10:15:16 AM: Successfully installed @sveltejs/adapter-netlify.
10:15:16 AM: If you plan on staying on this deployment platform, consider replacing @sveltejs/adapter-auto with @sveltejs/adapter-netlify. This will give you faster and more robust installs, and more control over deployment configuration.
10:15:16 AM: No netlify.toml found. Using default publish directory. Consult https://kit.svelte.dev/docs/adapter-netlify#usage for more details
10:15:16 AM: ✔ done
10:15:16 AM:
10:15:16 AM: (build.command completed in 7.7s)
10:15:16 AM:
10:15:16 AM: Functions bundling
10:15:16 AM: ────────────────────────────────────────────────────────────────
10:15:16 AM:
10:15:16 AM: Packaging Functions from .netlify/functions-internal directory:
10:15:16 AM: - sveltekit-render.mjs
10:15:16 AM:
10:15:17 AM:
10:15:17 AM: (Functions bundling completed in 1s)
10:15:17 AM:
10:15:18 AM: Finished processing build request in 43.293s
Deploying
Failed
Deploying
Failed
10:15:17 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
10:15:17 AM: Deploy site
10:15:17 AM: ────────────────────────────────────────────────────────────────
10:15:17 AM:
10:15:17 AM: Section completed: deploying
10:15:17 AM:
10:15:17 AM: Configuration error
10:15:17 AM: ────────────────────────────────────────────────────────────────
10:15:17 AM:
10:15:17 AM: Error message
10:15:17 AM: Deploy did not succeed: Deploy directory 'public' does not exist
10:15:17 AM:
10:15:17 AM: Resolved config
10:15:17 AM: build:
10:15:17 AM: command: npm run build
10:15:17 AM: commandOrigin: ui
10:15:17 AM: publish: /opt/build/repo/public
10:15:17 AM: publishOrigin: ui
10:15:17 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:15:17 AM: Failing build: Failed to build site
Cleanup
Skipped
Cleanup
Skipped
There is no log for this section
Post-processing
Skipped
Post-processing
Skipped
There is no log for this section