We are currently looking for a solution for adjusting this, but just wanted to give a heads-up to the fellow frontity users that might have not heard about this. Once we have found a solution it will be shared here.
I have done a lot of testing and this simply doesn’t seem to affect the version or I am logging it not in the correct manner.
Also I noticed that LambdaRuntime doesnt support 16.x. See here: vercel/DEVELOPING_A_RUNTIME.md at main · vercel/vercel · GitHub
At the moment I am still in talks with Vercel, but they said they can’t really give us support for this as we are using a custom builder.
@luisherranz Luis, I know you are busy with other stuff, but would be great if you have a few minutes to give us your input.
In order to find out which Node.js version your Deployment is using, run node -v in the Build Command or log the output of process.version.
My first attempt was to add node -v after the frontity build command. So in package.json the build command looked like "build": "frontity build && node -v",. No matter what I did it stayed at 12.x.
Now I am trying to log process.version in the actual build function in the builder like this: now-builder/index.ts at master · DonKoko/now-builder · GitHub but that seems to log the version set in the settings, even though it doesn’t have an effect.
At first vecel support told me they cant help me because its a custom builder, but then I explained it uses @now/buiild-utils function createLambda() but no matter what I set it won’t change it. Since then they stopped answering. That was yesterday mid-day.
I will continue to test stuff. Let me know if you find something as I feel we have to confirm the version before being 100% sure it works.
I did a lot of testing and I think i found a bug in vercel. For me it doesn’t work on any of my team projects, but when I tried it on a project in my personal profile it worked and it set the version to 16. So that’s good. I have already contacted vercel support about it and I am also trying to debugg it myself.
Could you also update the npm package: @frontity/now - npm
It doesn’t seem to have the latest version live.
Yeah that doesn’t solve it for me. I really think its a bug in Vercel. After digging deeper I found differences in the build log of the project that i moved to my personal account. Same project, no code changes but it works on personal user but not on team.
I have a confirmation from @frederik.nordahl that for him it works in team so I really think its something very weird. Still waiting for response from Vercel.
I will give an update once I know more but basically that whole part is missing from my logs when I deploy to a project in my team:
[15:41:45.920] Cloning github.com/Whale-Agency/rooftop-frontity-theme (Branch: main, Commit: 0a645a6)
[15:41:46.569] Cloning completed: 649.058ms
[15:41:47.478] Looking up build cache...
[15:41:47.715] Build Cache not found
[15:41:47.935] Running "vercel build"
[15:41:48.423] Vercel CLI 27.3.4
[15:41:48.522] WARN! Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings
[15:41:48.884] yarn add v1.22.17
[15:41:48.904] info No lockfile found.
[15:41:48.924] [1/4] Resolving packages...
[15:41:50.398] warning @frederiknordahl/now > @now/node-bridge@1.3.1: "@now/node-bridge" is deprecated and will stop receiving updates January 2021. Please use "@vercel/node-bridge" instead.
[15:41:50.399] [2/4] Fetching packages...
[15:41:50.896] [3/4] Linking dependencies...
[15:41:50.896] warning " > @frederiknordahl/now@1.2.4" has unmet peer dependency "@now/build-utils@^0.9.4".
[15:41:50.965] [4/4] Building fresh packages...
[15:41:50.976] success Saved lockfile.
[15:41:50.980] success Saved 3 new dependencies.
[15:41:50.981] info Direct dependencies
[15:41:50.981] ├─ @frederiknordahl/now@1.2.4
[15:41:50.981] └─ @vercel/build-utils@5.0.8
[15:41:50.981] info All dependencies
[15:41:50.981] ├─ @frederiknordahl/now@1.2.4
[15:41:50.981] ├─ @now/node-bridge@1.3.1
[15:41:50.981] └─ @vercel/build-utils@5.0.8
[15:41:50.983] Done in 2.10s.
Okey guys, I have an update for this.
Since yesterday builds have been failing. After investigating i found out that the build script was setting node to 18.x which doesn’t work for us.
I did a lot of investigation and looking at resources and PRs from the vercel team.
So because there is now node 18.x you actually need to specify the node version in the engines in your package.json, like this:
"engines": {
"node": "16.x"
},
At first I thought its a bug as based on my testing, because when using a custom builder the engines property was ignored. I talked to some engineers at vercel and they said that its not a bug, it simply didnt affect out build before, because 16.x was the latest available version.
Thank you so much. What a lifesaver. Had a critical update to do today.
Is there any plan or path to have Frontity update to work with future versions of Node? I know the main dev team no longer works on it, so I guess I’m asking if there’s anyone at all working on Frontity core these days?