Search code examples
node.jsmeteor

Meteor 2.5. works with Node 16.18, why is that?


I have been looking into a pet project of my friend and by chance I found out that he is running Meteor 2.5 with Node 16.18, full version list below:

npm: '8.19.2', node: '16.18.0', v8: '9.4.146.26-node.22', uv: '1.43.0', zlib: '1.2.11', brotli: '1.0.9', ares: '1.18.1', modules: '93', nghttp2: '1.47.0', napi: '8', llhttp: '6.0.10', openssl: '1.1.1q+quic', cldr: '41.0', icu: '71.1', tz: '2022b', unicode: '14.0', ngtcp2: '0.8.1',

As far as I am aware, Meteor requires a version of Node <14 so I am a bit puzzled. The app contains a lot of async/await code and runs in production with no issues. Am I missing something here? Thank you

I expected that async code would not work.


Solution

  • Meteor requires a version of Node <14

    It depends on the exact version of your Meteor project.

    If you use version 2.5 exactly:

    Node updated to v14.18.1

    So it is compatible with version 14.

    BTW async/await is supported in Node.js since version 7.6.0 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function#browser_compatibility


    That being said, as you noticed, nothing prevents you from trying to run the Meteor built app with a different version of Node.js than what it claims to be compatible with.

    But in some cases the app may refuse to start if the version is too different, see Is it possible to upgrade the underlying Node.js version used by Meteor without upgrading Meteor?