Hello!
I’m migrating some stuff that I have hosted somewhere else to Vercel. My personal website migration was quite smooth, it’s a simple static blog in Next.js.
Though I’m having some problems trying to migrate my resume website.
This one too is a static website written in Next.js, though I have an extra postbuild
step when deploying it as I need to generate a PDF after build.
I do that by starting a Chromium instance and using Selenium to print to PDF the whole page.
To do that I started a minimal Python
webserver to serve the just built static sources, that doesn’t seem to cause any issue in the process. The webserver doesn’t seem to be the issue as it doesn’t produce any error, though Selenium crashes.
This is the script that I’m using.
This is the relevant section in build log.
> resume@0.1.0 create-pdf
> tsx create-pdf.ts
/vercel/path0/node_modules/.pnpm/selenium-webdriver@4.27.0/node_modules/selenium-webdriver/remote/index.js:256
let cancelToken = earlyTermination.catch((e) => reject(Error(e.message)))
^
Error: Server terminated early with status 127
at /vercel/path0/node_modules/.pnpm/selenium-webdriver@4.27.0/node_modules/selenium-webdriver/remote/index.js:256:70
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Node.js v22.12.0
ELIFECYCLE Command failed with exit code 1.
Error: Command "pnpm run build" exited with 1
These are all the resources for my resume, maybe they might be helpful.
This works correctly locally with this environment:
$ node --version
v22.12.0
$ pnpm --version
9.15.2
dependencies:
@fortawesome/fontawesome-svg-core 6.7.2
@fortawesome/free-brands-svg-icons 6.7.2
@fortawesome/free-solid-svg-icons 6.7.2
@fortawesome/react-fontawesome 0.2.2
next 15.1.2
react 19.0.0
react-dom 19.0.0
toml 3.0.0
devDependencies:
@eslint/eslintrc 3.2.0
@types/chrome-remote-interface 0.31.14
@types/node 20.17.10
@types/react 19.0.2
@types/react-dom 19.0.2
@types/selenium-webdriver 4.1.27
chrome-remote-interface 0.33.2
eslint 9.17.0
eslint-config-next 15.1.2
postcss 8.4.49
selenium-webdriver 4.27.0
tailwindcss 3.4.17
tsx 4.19.2
typescript 5.7.2
This is also working with no issues on Netlify with Node 22.x
.
This leads me to think that maybe it’s not possible to do something like this on Vercel? Are there some limitations in the deployment step that stops me from using Selenium?