Strapi Node v16 Build Issues

System Information
  • Strapi Version: 4.4.5
  • Operating System: Azure
  • Database: mysql
  • Node Version: 16.17.1
  • NPM Version: 8.15
  • Yarn Version: 3

Hello Strapi Fans :wave:

We’re in a bit of a pickle with our setup, and we are hoping someone can provide some insights.

  • Locally we can run Strapi just fine on Node 14 & 16.
  • We can yarn develop and yarn build with no problems on either of those Node versions
  • However when BUILDING it on Azure with Node 16 using the command node node_modules/@strapi/strapi/bin/strapi.js start, the admin fails with a number of JS console errors:

  • When we switch to version 14, the build on Azure works perfectly.

The problem though is Node v14 EOL and losing Azure support next month. So we need to find a way to get it to build on v16.

Is anyone able to confirm why Strapi doesn’t build on Node 16 even though their documentation says otherwise? There are quite a few posts like this on SO of people who just resort to building on v14.

Grateful for any assistance.:pray:

If this is an issue in the pipeline make sure in the Azure pipeline you clear the cache so it uses the newly fresh node 16/18 cache.
As most pipelines will cache the old ones to save time your technically trying to build it with 14 though the yarn.lock file etc is set to 16