vercel / og-image

Open Graph Image as a Service - generate cards for Twitter, Facebook, Slack, etc
https://og-image.vercel.app
MIT License
4.05k stars 1.27k forks source link

Add support for Node 16 (LTS) #199

Closed marcofranssen closed 1 year ago

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/og-image/DMa5qoBKz89XVguUZ7vS74cEb6e3
✅ Preview: https://og-image-git-fork-marcofranssen-support-node16.vercel.sh

marcofranssen commented 2 years ago

On my local environment I'm able to run it with Node 16, is there a way to support this locally with Node 16, but still enforce Node 14 for the AWS parts?

styfle commented 2 years ago

If its working fine locally, why does the config need to change?

marcofranssen commented 2 years ago

If its working fine locally, why does the config need to change?

Otherwise it just errors with a message Node 14 is required.

styfle commented 2 years ago

What is the error? Can you use --ignore-engines flag?

marcofranssen commented 2 years ago

What is the error? Can you use --ignore-engines flag?

See below the error and tryout of --ignore-engines.

$ yarn build --ignore-engines
yarn run v1.22.18
error @: The engine "node" is incompatible with this module. Expected version "14.x". Got "16.14.2"
error Commands cannot run with an incompatible environment.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
$ vercel dev --ignore-engines
Vercel CLI 24.0.0
Error! unknown or unexpected option: --ignore-engines
$ vercel dev
Vercel CLI 24.0.0
> Creating initial build
Running "yarn run build"
yarn run v1.22.18
error @: The engine "node" is incompatible with this module. Expected version "14.x". Got "16.14.2"
error Commands cannot run with an incompatible environment.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error! Command "yarn run build" exited with 1
styfle commented 2 years ago

It works with yarn --ignore-engines build

marcofranssen commented 2 years ago

Is it OK to add that as a fix in this PR? Otherwise I'm still stuck with the fact I can't use it out of the box.

I either have to change the supported node version or I have to change this build script.

marcofranssen commented 2 years ago

To make it work locally. Otherwise you get the error only node 14 is supported

Get Outlook for iOShttps://aka.ms/o0ukef


From: Steven @.> Sent: Monday, March 14, 2022 3:32:47 PM To: vercel/og-image @.> Cc: Marco Franssen @.>; Author @.> Subject: Re: [vercel/og-image] Add support for Node 16 (LTS) (PR #199)

If its working fine locally, why does the config need to change?

— Reply to this email directly, view it on GitHubhttps://github.com/vercel/og-image/pull/199#issuecomment-1066873313, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAFJTTKMA2VZ4EGQ2ERSPDDU75EY7ANCNFSM5QPOU3GQ. You are receiving this because you authored the thread.Message ID: @.***>

styfle commented 1 year ago

Closing in favor of #226