Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to latest Node LTS v18 #231

Draft
wants to merge 6 commits into
base: trunk
Choose a base branch
from
Draft

Conversation

Jinksi
Copy link
Member

@Jinksi Jinksi commented Oct 27, 2022

Fixes #230

Description

How to test this PR

  1. Check out this branch.
  2. Install the latest LTS version of node by running nvm install from this repo's directory.
  3. Run nvm use. You should now be using Node v18.x.
  4. Run npm install. You should not see an Unsupported engine warning.
  5. Run npm run build. The build should complete successfully.
  • No npm install warning related to unsupported engines.
  • npm run build works as expected without errors.
    • Build artefacts in ./build have minor changes, presumably due to updating @wordpress/scripts.
  • package-lock.json reflects any changes related to the node/npm version upgrade.

Product impact

  • Added changelog entry (or does not apply)
  • Will this PR affect WooCommerce Subscriptions? yes/no/tbc, add issue ref
  • Will this PR affect WooCommerce Payments? yes/no/tbc, add issue ref

@Jinksi Jinksi added the type: task The issue is an internally driven task (e.g. from another A8c team). label Oct 27, 2022
@Jinksi Jinksi changed the title Update package.json engines to node LTS v18.12.0 Upgrade to latest Node LTS v18 Oct 27, 2022
Copy link
Member Author

@Jinksi Jinksi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, when running on node v18, npm run build results in the error below.

It looks like we'll be forced to upgrade some packages starting with @wordpress/scripts.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task The issue is an internally driven task (e.g. from another A8c team).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build error when using the current Node LTS v18
1 participant