vivliostyle / vivliostyle-cli

⚒ Supercharge command-line publication workflow.
https://docs.vivliostyle.org/#/vivliostyle-cli
GNU Affero General Public License v3.0
166 stars 25 forks source link

`vivliostyle build` return errors with deploy on Vercel #533

Open scillidan opened 1 week ago

scillidan commented 1 week ago

Node.js Version: 22.x

[14:20:40.035] Running build in Washington, D.C., USA (East) – iad1
[14:20:40.133] Cloning github.com/scillidan/PAGES (Branch: main, Commit: ed50b1c)
[14:20:40.467] Previous build cache not available
[14:20:40.981] Cloning completed: 850.062ms
[14:20:41.274] Running "vercel build"
[14:20:41.733] Vercel CLI 37.8.0
[14:20:42.379] Running "install" command: `npm install -g @vivliostyle/cli`...
[14:20:56.874] npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
[14:20:56.941] npm warn deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
[14:20:57.482] npm warn deprecated trim@0.0.1: Use String.prototype.trim() instead
[14:20:57.925] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[14:20:58.034] npm warn deprecated read-package-json@6.0.4: This package is no longer supported. Please use @npmcli/package-json instead.
[14:20:58.297] npm warn deprecated are-we-there-yet@4.0.2: This package is no longer supported.
[14:20:58.371] npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
[14:20:58.406] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[14:20:58.451] npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
[14:20:58.639] npm warn deprecated gauge@5.0.2: This package is no longer supported.
[14:20:59.214] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[14:20:59.282] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[14:20:59.662] npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
[14:20:59.758] npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
[14:20:59.759] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[14:20:59.760] npm warn deprecated npmlog@6.0.2: This package is no longer supported.
[14:20:59.870] npm warn deprecated domexception@4.0.0: Use your platform's native DOMException instead
[14:20:59.990] npm warn deprecated npmlog@7.0.1: This package is no longer supported.
[14:21:00.172] npm warn deprecated gauge@4.0.4: This package is no longer supported.
[14:21:02.036] 
[14:21:02.036] added 712 packages in 20s
[14:21:02.036] 
[14:21:02.037] 190 packages are looking for funding
[14:21:02.037]   run `npm fund` for details
[14:21:04.308] - Collecting build config
[14:21:04.599] ℹ Launching build environment
[14:21:04.600] ℹ Rendering browser is not installed yet. Downloading now...
[14:21:04.612] BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
[14:21:04.613] Downloading Chromium 128.0.6613.18 (playwright build v1129) from https://playwright.azureedge.net/builds/chromium/1129/chromium-linux.zip
[14:21:04.849] |                                                                                |   0% of 162.8 MiB
[14:21:05.018] |■■■■■■■■                                                                        |  10% of 162.8 MiB
[14:21:05.172] |■■■■■■■■■■■■■■■■                                                                |  20% of 162.8 MiB
[14:21:05.322] |■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 162.8 MiB
[14:21:05.424] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 162.8 MiB
[14:21:05.579] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 162.8 MiB
[14:21:05.697] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 162.8 MiB
[14:21:05.845] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 162.8 MiB
[14:21:06.177] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 162.8 MiB
[14:21:06.398] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 162.8 MiB
[14:21:06.506] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 162.8 MiB
[14:21:10.208] Chromium 128.0.6613.18 (playwright build v1129) downloaded to /vercel/.cache/ms-playwright/chromium-1129
[14:21:10.208] BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
[14:21:10.209] Downloading FFMPEG playwright build v1009 from https://playwright.azureedge.net/builds/ffmpeg/1009/ffmpeg-linux.zip
[14:21:10.443] |                                                                                |   0% of 2.6 MiB
[14:21:10.465] |■■■■■■■■                                                                        |  10% of 2.6 MiB
[14:21:10.473] |■■■■■■■■■■■■■■■■                                                                |  20% of 2.6 MiB
[14:21:10.478] |■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 2.6 MiB
[14:21:10.481] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 2.6 MiB
[14:21:10.485] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 2.6 MiB
[14:21:10.489] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 2.6 MiB
[14:21:10.495] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 2.6 MiB
[14:21:10.497] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 2.6 MiB
[14:21:10.497] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 2.6 MiB
[14:21:10.499] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.6 MiB
[14:21:10.591] FFMPEG playwright build v1009 downloaded to /vercel/.cache/ms-playwright/ffmpeg-1009
[14:21:10.591] ✔ Successfully downloaded browser
[14:21:10.592] ℹ Collecting build config
[14:21:10.614] browserType.launch: Target page, context or browser has been closed
[14:21:10.614] Browser logs:
[14:21:10.614] 
[14:21:10.614] <launching> /vercel/.cache/ms-playwright/chromium-1129/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding,PlzDedicatedWorker --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --headless=old --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --allow-file-access-from-files --disable-web-security  --lang=en --user-data-dir=/tmp/playwright_chromiumdev_profile-Ms1lJS --remote-debugging-pipe --no-startup-window
[14:21:10.614] <launched> pid=242
[14:21:10.614] [pid=242][err] /vercel/.cache/ms-playwright/chromium-1129/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
[14:21:10.614] [pid=242] <process did exit: exitCode=127, signal=null>
[14:21:10.614] [pid=242] starting temporary directories cleanup
[14:21:10.614] Call log:
[14:21:10.614]   - <launching> /vercel/.cache/ms-playwright/chromium-1129/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding,PlzDedicatedWorker --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --headless=old --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --allow-file-access-from-files --disable-web-security  --lang=en --user-data-dir=/tmp/playwright_chromiumdev_profile-Ms1lJS --remote-debugging-pipe --no-startup-window
[14:21:10.614]   - <launched> pid=242
[14:21:10.614]   - [pid=242][err] /vercel/.cache/ms-playwright/chromium-1129/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
[14:21:10.614]   - [pid=242] <process did exit: exitCode=127, signal=null>
[14:21:10.614]   - [pid=242] starting temporary directories cleanup
[14:21:10.615] 
[14:21:10.615]     at launchBrowser (/node20/lib/node_modules/@vivliostyle/cli/dist/browser.js:25:51)
[14:21:10.615]     at buildPDF (/node20/lib/node_modules/@vivliostyle/cli/dist/output/pdf.js:69:27)
[14:21:10.615]     at async build (/node20/lib/node_modules/@vivliostyle/cli/dist/build.js:69:30)
[14:21:10.615] 
[14:21:10.615] If you think this is a bug, please report at https://github.com/vivliostyle/vivliostyle-cli/issues
[14:21:10.633] Error: Command "vivliostyle build" exited with 1

I remember in June, it didn't report any errors 🤔

spring-raining commented 1 week ago

Seemed to be same issue with https://github.com/microsoft/playwright/issues/23633 . Can you try to run npx playwright install --with-deps before the launching of vivliostyle-cli?

scillidan commented 1 week ago

Returned this time:

[[17:59:02.156] Running build in Washington, D.C., USA (East) – iad1
[17:59:02.271] Cloning github.com/scillidan/PAGES (Branch: main, Commit: ed50b1c)
[17:59:02.279] Skipping build cache, deployment was triggered without cache.
[17:59:03.090] Cloning completed: 818.374ms
[17:59:03.399] Running "vercel build"
[17:59:03.804] Vercel CLI 37.8.0
[17:59:04.414] Running "install" command: `npm install -g @vivliostyle/cli && npx playwright install --with-deps`...
[17:59:22.021] npm warn deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
[17:59:22.080] npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
[17:59:22.542] npm warn deprecated trim@0.0.1: Use String.prototype.trim() instead
[17:59:22.924] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[17:59:22.955] npm warn deprecated read-package-json@6.0.4: This package is no longer supported. Please use @npmcli/package-json instead.
[17:59:23.148] npm warn deprecated are-we-there-yet@4.0.2: This package is no longer supported.
[17:59:23.211] npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
[17:59:23.212] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[17:59:23.213] npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
[17:59:23.549] npm warn deprecated gauge@5.0.2: This package is no longer supported.
[17:59:23.949] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[17:59:24.006] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[17:59:24.481] npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
[17:59:24.510] npm warn deprecated domexception@4.0.0: Use your platform's native DOMException instead
[17:59:24.512] npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
[17:59:24.549] npm warn deprecated npmlog@6.0.2: This package is no longer supported.
[17:59:24.549] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[17:59:24.630] npm warn deprecated npmlog@7.0.1: This package is no longer supported.
[17:59:24.816] npm warn deprecated gauge@4.0.4: This package is no longer supported.
[17:59:26.545] 
[17:59:26.545] added 712 packages in 22s
[17:59:26.546] 
[17:59:26.546] 190 packages are looking for funding
[17:59:26.546]   run `npm fund` for details
[17:59:27.930] npm warn exec The following package was not found and will be installed: playwright@1.48.1
[17:59:29.359] ╔═══════════════════════════════════════════════════════════════════════════════╗
[17:59:29.359] ║ WARNING: It looks like you are running 'npx playwright install' without first ║
[17:59:29.360] ║ installing your project's dependencies.                                       ║
[17:59:29.360] ║                                                                               ║
[17:59:29.360] ║ To avoid unexpected behavior, please install your dependencies first, and     ║
[17:59:29.360] ║ then run Playwright's install command:                                        ║
[17:59:29.360] ║                                                                               ║
[17:59:29.360] ║     npm install                                                               ║
[17:59:29.360] ║     npx playwright install                                                    ║
[17:59:29.360] ║                                                                               ║
[17:59:29.360] ║ If your project does not yet depend on Playwright, first install the          ║
[17:59:29.360] ║ applicable npm package (most commonly @playwright/test), and                  ║
[17:59:29.360] ║ then run Playwright's install command to download the browsers:               ║
[17:59:29.360] ║                                                                               ║
[17:59:29.360] ║     npm install @playwright/test                                              ║
[17:59:29.360] ║     npx playwright install                                                    ║
[17:59:29.360] ║                                                                               ║
[17:59:29.360] ╚═══════════════════════════════════════════════════════════════════════════════╝
[17:59:29.360] BEWARE: your OS is not officially supported by Playwright; installing dependencies for ubuntu20.04-x64 as a fallback.
[17:59:29.361] Installing dependencies...
[17:59:29.367] sh: apt-get: command not found
[17:59:29.368] Failed to install browsers
[17:59:29.368] Error: Installation process exited with code: 127
[17:59:29.395] Error: Command "npm install -g @vivliostyle/cli && npx playwright install --with-deps" exited with 1
[17:59:29.597] 

But I can't run apt-get on Vercel. It seems that we need to wait for Vercel's repair. Not be vivliostyle-cli's problem.