Open
Description
Describe the bug
The Long Term Support (LTS) version of Node.js is now 18.x. source
Currently, when running on node v18, npm run build
results in the error below.
wp-scripts build assets/src/js/index.js
node_modules/loader-runner/lib/LoaderRunner.js:114
throw e;
^
Error: error:0308010C:digital envelope routines::unsupported
We support the LTS version of node in .nvmrc
, so we should ensure that our dev tooling works with the new LTS version.
woocommerce-subscriptions-core/.nvmrc
Line 1 in 8017438
To Reproduce
- Checkout
trunk
- Install the latest LTS version of node by running
nvm install
from this repo's directory. - Run
nvm use
, you should now be using Node v18.x. - Run
npm install
. Notice anUnsupported engine
warning.npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '[email protected]', npm WARN EBADENGINE required: { node: '^16.17.1', npm: '^8.15.0' }, npm WARN EBADENGINE current: { node: 'v18.12.0', npm: '8.19.2' } npm WARN EBADENGINE }
- Run
npm run build
. Notice thewp-scripts
error as mentioned above.
Product impact
- Does this issue affect WooCommerce Subscriptions? no
- Does this issue affect WooCommerce Payments? no