Skip to content

Commit

Permalink
fix(crwa): pin Node.js version in .nvmrc (#9614)
Browse files Browse the repository at this point in the history
@Tobbe and I reproduced Netlify deploys failing on Node.js with the
following Prisma error (only during run, not build, curiously):

```
Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x".This happened because Prisma Client was generated for "debian-openssl-1.1.x", but the actual deployment required "rhel-openssl-3.0.x"
```

Netlify was deploying with Node.js 20, even if we set the `NODE_VERSION`
env var to `18` in Netlify's deploy settings. It seemed like the
`.nvmrc` file (which specified any lts version: `lts/*`) was taking
precedence over the NODE_VERSION env var.

This PR pins the Node.js lts version to 18 in the .nvmrc. We're not sure
if we even need to ship with this file but this seemed like the safer
change for now.

Update: @Tobbe and I tried removing the `.nvmrc` file in a test deploy.
Netlify defaulted to Node.js 16 which also isn't what we want, so it
should stay.
  • Loading branch information
jtoar committed Dec 2, 2023
1 parent 17c1989 commit 0e13001
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion __fixtures__/empty-project/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/*
v18
2 changes: 1 addition & 1 deletion __fixtures__/test-project/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/*
v18
2 changes: 1 addition & 1 deletion packages/create-redwood-app/templates/js/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/*
v18
2 changes: 1 addition & 1 deletion packages/create-redwood-app/templates/ts/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/*
v18

0 comments on commit 0e13001

Please sign in to comment.