Deployment suddenly failing

My deployment is suddenly failing with Nuxt Fatal Error
I rolled back, but still the same error
I tried to deploy the most recent that succeeded but still the same error


Error: Cannot find module ‘node:module’
Require stack:

  • /opt/buildhome/repo/node_modules/jiti/dist/jiti.js
  • /opt/buildhome/repo/node_modules/jiti/lib/index.js
  • /opt/buildhome/repo/node_modules/@nuxt/utils/dist/utils.js
  • /opt/buildhome/repo/node_modules/@nuxt/cli/dist/cli-index.js
  • /opt/buildhome/repo/node_modules/@nuxt/cli/dist/cli.js
  • /opt/buildhome/repo/node_modules/nuxt/bin/nuxt.js

I had the same issue in localhost, but got it working by upgrading node and npm and removing the node_modules folder and doing an npm update

You can do this for the build process by setting a NODE_VERSION environment variable to the version you need. However, it has to be 17 at most, for now, until the new build image is released.