Starting this morning I'm unable to run now --prod with the following error. Is it something I can fix myself or does @now/build-utils need to be updated?
2020-01-06T20:55:21.388Z Downloading 268 deployment files...
2020-01-06T20:55:23.831Z Installing build runtime...
2020-01-06T20:55:23.833Z yarn info @now/build-utils@latest...
2020-01-06T20:55:23.837Z yarn info @now/node...
2020-01-06T20:55:24.398Z Build runtime installed: 566.582ms
2020-01-06T20:55:25.194Z Installing build runtime...
2020-01-06T20:55:25.195Z yarn info @now/build-utils@latest...
2020-01-06T20:55:25.202Z yarn info @now/next...
2020-01-06T20:55:25.228Z Looking up build cache...
2020-01-06T20:55:25.803Z Build runtime installed: 610.538ms
2020-01-06T20:55:26.017Z Running builder.exports.build...
2020-01-06T20:55:26.018Z Installing dependencies...
2020-01-06T20:55:26.042Z { Error: This project is using a discontinued version of Node.js and must be upgraded.
2020-01-06T20:55:26.043Z Please use one of the following supported ranges in your `package.json`: ["12.x","10.x"]
2020-01-06T20:55:26.043Z This change is the result of a decision made by an upstream infrastructure provider (AWS).
2020-01-06T20:55:26.043Z Read more: https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html
2020-01-06T20:55:26.043Z at Object.getSupportedNodeVersion (/zeit/c20b383f69ac126a/.build-utils/.builder/node_modules/@now/node/dist/index.js:83817:15)
2020-01-06T20:55:26.043Z at Object.getNodeVersion (/zeit/c20b383f69ac126a/.build-utils/.builder/node_modules/@now/node/dist/index.js:89439:27)
2020-01-06T20:55:26.043Z at <anonymous> code: 'NOW_BUILD_UTILS_NODE_VERSION_DISCONTINUED' }
Hi @Zdend
This is expected since Node 8 has reached end-of-life. There should be warnings in your previous deployments and the warning changed to an error today.
Please set "engines": { "node": "12.x" } in your package.json file to upgrade to Node.js 12.
@Zdend you can also do any of the following...
"engines":` { "node": "10.x" }
"engines":` { "node": "12.x" }
"engines":` { "node": ">=10.0.0" }
"engines":` { "node": ">=12.0.0" }
The last two may prove useful if your local environment isn't using a version manager and is on a later version that 10 or 12, otherwise you will get an error like: engine "node" is incompatible with this module
Awesome! I noticed that the error message changed which makes it definitely easier to fix!