Skip to content

Investigate recent Windows build failures #7438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bmuenzenmeyer opened this issue Jan 31, 2025 · 10 comments
Closed

Investigate recent Windows build failures #7438

bmuenzenmeyer opened this issue Jan 31, 2025 · 10 comments
Assignees
Labels
infrastructure Issues/PRs related to the Repository Infra

Comments

@bmuenzenmeyer
Copy link
Collaborator

See https://github.com/nodejs/nodejs.org/actions/runs/13079510033/job/36499592135?pr=7434 as an example

This does not happen locally for me. (Windows 10 Pro)

Chatter in Slack suggest this might be something that changed on GitHub's side. Perhaps with their runners.

Until we figure it out, or it resolves, this story or a subtask should remove Windows as a required check

@bmuenzenmeyer
Copy link
Collaborator Author

bmuenzenmeyer commented Jan 31, 2025

I've deleted build on windows-latest from https://github.com/nodejs/nodejs.org/settings/rules/10785

Image

@bmuenzenmeyer
Copy link
Collaborator Author

cc @ovflowd

@benhalverson
Copy link
Member

@avivkeller avivkeller added the infrastructure Issues/PRs related to the Repository Infra label Mar 21, 2025
@avivkeller
Copy link
Member

avivkeller commented Mar 21, 2025

Running the following commands:

npm i --no-audit --no-fund --userconfig=/dev/null --omit=dev  
npx --package=turbo@latest -- turbo build --force=true --cache-dir=.turbo/cache  

Results in the following error during prerendering:

@node-core/website:build: Error occurred prerendering page "/en/next-data/og/announcement/Run JavaScript Everywhere". Read more: https://nextjs.org/docs/messages/prerender-error  
@node-core/website:build: TypeError: Invalid URL  
@node-core/website:build:     at new URL (node:internal/url:818:25)  
@node-core/website:build:     at fileURLToPath (node:internal/url:1505:12)  
@node-core/website:build:     at file:///C:/nodejs.org/node_modules/next/dist/compiled/@vercel/og/index.node.js:18929:32  
@node-core/website:build:     at ModuleJob.run (node:internal/modules/esm/module_job:271:25)  
@node-core/website:build:     at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:578:26)  
@node-core/website:build:     at async Object.start (C:\nodejs.org\apps\site\.next\server\app\[locale]\next-data\og\[category]\[title]\route.js:1:6866)  

I was able to reproduce the issue and will investigate further.

The problematic line is from @vercel/og:

var fontData = fs.readFileSync(fileURLToPath(join(import.meta.url, "../noto-sans-v27-latin-regular.ttf")));

Changing it to the following would likely resolve the issue:

var fontData = fs.readFileSync(new URL("../noto-sans-v27-latin-regular.ttf", import.meta.url));

@avivkeller
Copy link
Member

avivkeller commented Mar 21, 2025

I see the issue. I think it's upstream, but essentially, on windows, join-ing a file:// url results in an invalid URL, but on Posix it doesn't.

Edit:

The issue is in @vercel/og, but that appears to be closed source. CC @styfle.

@avivkeller avivkeller moved this from 📋 Backlog to 🏗 In progress in Node.js Website Mar 22, 2025
@avivkeller avivkeller self-assigned this Mar 25, 2025
@avivkeller
Copy link
Member

I've reached to Vercel explaining the issue, and will let you know what they say.

@mcollina
Copy link
Member

You should not be manipulating file:// URLs with path.join().

@ovflowd
Copy link
Member

ovflowd commented Mar 30, 2025

You should not be manipulating file:// URLs with path.join().

It is not us. It is the @vercel/og package

huozhi added a commit to vercel/next.js that referenced this issue Mar 31, 2025
### What

Upgrade the `@vercel/og` patch to Next.js which will resolve the build
issue on windows.

Closes NEXT-4069
Related #77164 
Related: nodejs/nodejs.org#7438
@styfle
Copy link
Member

styfle commented Apr 1, 2025

This is fixed in vercel/next.js#77650 and should be available on next@canary shortly.

@avivkeller
Copy link
Member

TYSM! We will update at the next Next.js release

huozhi added a commit to vercel/next.js that referenced this issue Apr 8, 2025
Upgrade the `@vercel/og` patch to Next.js which will resolve the build
issue on windows.

Closes NEXT-4069
Related #77164
Related: nodejs/nodejs.org#7438
huozhi added a commit to vercel/next.js that referenced this issue Apr 8, 2025
Upgrade the `@vercel/og` patch to Next.js which will resolve the build
issue on windows.

Closes NEXT-4069
Related #77164
Related: nodejs/nodejs.org#7438
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Node.js Website Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Issues/PRs related to the Repository Infra
Projects
Status: ✅ Done
Development

No branches or pull requests

6 participants