[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# Error: Found invalid Node.js Version: "18.x"

851 views · 13 likes · 9 posts


Mike (@mikenikles) · 2024-11-26

<!-- Questions that get answered the fastest are the ones with relevant info included in the original post. Be sure to include all detail needed to let others see and understand the problem! -->

Our SvelteKit web app `package.json` (located at `packages/webapp` in a monorepo) contains the following:

```json
"engines": {
  "node": "18.x"
},
```

All of a sudden two days ago, builds started to fail with the following error:

```
Error: Found invalid Node.js Version: "18.x". Please set "engines": { "node": "22.x" } in your `package.json` file to use Node.js 22.
```

Our Vercel project settings also specify Node.js 18, although that's irrelevant since the value in `package.json` takes precedence. We also have a root-level `package.json` which specifies the following:

```json
  "engines": {
    "node": ">=18",
    "pnpm": "9.4.0 || >=9.7.0"
  },
```

I expect this to be irrelevant as well since the root directory for the `webapp` project in Vercel is set to `packages/webapp`.

I also have an open support case #311491, but there's been radio silence for the last 15 hours, hence I'm posting here to see if the community can help.


Swarnava Sengupta (@swarnava) · 2024-11-26 · ♥ 1

Hi,

Can you share your `vercel.json` and `package.json` file? If you are using monorepo, please share your root vercel.json as well.


Amy Egan (@amyegan) · 2024-11-26 · ♥ 2

First, I want to try to get you unstuck as quickly as possible with a temporary workaround. You may be able to [deploy from local build](https://vercel.com/docs/cli/deploying-from-cli#deploying-from-local-build-prebuilt) with the `--prebuilt` flag. 

As @swarnava mentioned, the `vercel.json` and `package.json` would tell us more about the configuration settings for the project.


Pauline P. Narvas (@pawlean) · 2024-11-26 · ♥ 2

You're already getting help from the very best, but wanted to say - hi @mikenikles! Nice to see you here :smile:


Mike (@mikenikles) · 2024-11-26 · ♥ 1

We don't have a `vercel.json` file. As for the root-level and `packages/webapp` `package.json` files, is there anything other than what I share that you need?

Our GitHub workflow step to deploy the web app is:

```yaml
  deploy-webapp-dev:
    runs-on: ubuntu-latest

    environment:
      name: webapp-dev
      url: https://dev.redacted.com

    defaults:
      run:
        working-directory: .

    steps:
      - uses: actions/checkout@v4

      # using a fork of amondnet/vercel-action for now until it is updated for node20
      - uses: vincent8balls/vercel-action@master
        with:
          vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
          vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} #Required
          vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}} #Required
          scope: <redacted>
          vercel-project-name: webapp
```

The support ticket (#311491) contains a link to one of the deployments that failed in case that provides more context. The specific deployment is `6oem3zGWUR8tZebqUDhriR66y9A9`

Hi Pauline :wave: :slight_smile:!


Swarnava Sengupta (@swarnava) · 2024-11-26 · ♥ 1

Yes we will need the whole package.json file. I believe one of your packages is somehow overriding our `Nodeversion` preference. Are you using any custom builder or zero config deployment?

Can you share a [reproducible](https://vercel.com/guides/creating-a-minimal-reproducible-example) steps?


Mike (@mikenikles) · 2024-11-26

Unfortunately, this is not an open source project and I can't share the entire `package.json` files. However, before we go down the path of sharing a reproducible of an enterprise application, can you confirm that https://vercel.com/changelog/node-js-22-lts-is-now-available is not the cause of our failed builds?

You announced Node.js 22 support on November 22. The first deployment we did after that announcement failed with an error telling us to upgrade to Node.js 22.

Once you confirm this is not the problem of our failed builds, I'll be able to justify the time investment to create a reproducible project.

I appreciate your help so far, as this is more than the radio silence I've gotten from the support ticket.


Swarnava Sengupta (@swarnava) · 2024-11-27 · ♥ 1

It appears that my colleague, Anna, has already identified the problem and responded via ticket. This was related to the outdated Sveltekit adapter that was unaware of the latest Node version. Please let us know if you have any questions.


Mike (@mikenikles) · 2024-11-27 · ♥ 5

For anyone else who ends up here in the future: If you have a monorepo with a `package.json` at the root-level and one at `packages/xyz`, the root-level file is used to determine the Node.js engine. A few other facts that apply to this:
* The Vercel project's root dir is set to `packages/xyz`
* The install command runs at the root