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

build: upgrade to node16 #259

Merged
merged 5 commits into from Dec 2, 2021
Merged

build: upgrade to node16 #259

merged 5 commits into from Dec 2, 2021

Conversation

binodpant
Copy link
Contributor

@binodpant binodpant commented Nov 23, 2021

Description:
Was awaiting #245 so now this is unblocked

locally: Devs should ideally use nvm use after syncing repo, clean out node modules and npm ci : nvm automatically chooses latest node/npm version for v16 based on .nvmrc file
in Github builds: tooling is configured to honor .nvmrc already

Alternative to use nvm is to manually install node16/npm8 but note that different projects may be (as of now) using different node versions, so nvm is highly recommended

Description:

Upgrades project to use nvmrc and node16 (specified in nvmrc file)
Local dev users should either:

  • run nvm use after syncing this change (if they use nvm), OR,
  • install node16 and npm8 after syncing this change, to stay current with the nvmrc based node/npm versions.

NOTE: since nvmrc uses the v16 version, nvm will choose the latest node and npm versions under the major version (v16.y.z for node and v8.y.z for npm) applicable when you run nvm use

Describe what this pull request changes, and why. Include implications for people using this change.

Merge checklist:

  • Consider running your code modifications in the included example app within frontend-platform. This can be done by running npm start and opening http://localhost:8080.
  • Consider testing your code modifications in another local micro-frontend using local aliases configured via the module.config.js file in frontend-build.
  • Verify your commit title/body conforms to the conventional commits format (e.g., fix, feat) and is appropriate for your code change. Consider whether your code is a breaking change, and modify your commit accordingly.

Post merge:

  • After the build finishes for the merged commit, verify the new release has been pushed to NPM.

@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2021

Codecov Report

Merging #259 (5985263) into master (402cf76) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #259   +/-   ##
=======================================
  Coverage   80.79%   80.79%           
=======================================
  Files          38       38           
  Lines         885      885           
  Branches      163      163           
=======================================
  Hits          715      715           
  Misses        159      159           
  Partials       11       11           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 402cf76...5985263. Read the comment docs.

@@ -6,34 +6,37 @@ on:
- master
pull_request:
branches:
- '**'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

my editor / vscode reformatted this file if this is not acceptable, I can revert! I have to check what settings exist that are doing this

Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be an issue. If this is the only change, then you can merge with this change since both versions are syntactically correct.

Copy link
Member

Choose a reason for hiding this comment

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

FWIW, I don't think the "**" is needed here. Just having pull_request under on should suffice to get the workflow to run on all Paragon PR updates.

@binodpant
Copy link
Contributor Author

Actually there is an issue!

With new node version, start fails like this

$ npm start
[webpack-cli] TypeError: Cannot read properties of undefined (reading 'tap')
    at HtmlWebpackPlugin.apply (/private/tmp/frontend-platform/frontend-platform/node_modules/@edx/frontend-build/node_modules/html-webpack-plugin/index.js:40:31)
    at WebpackCLI.webpack (/private/tmp/frontend-platform/frontend-platform/node_modules/webpack/lib/webpack.js:51:13)
    at WebpackCLI.createCompiler (/private/tmp/frontend-platform/frontend-platform/node_modules/webpack-cli/lib/webpack-cli.js:2191:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Command.<anonymous> (/private/tmp/frontend-platform/frontend-platform/node_modules/@webpack-cli/serve/lib/index.js:98:30)
    at async Promise.all (index 1)
    at async Command.<anonymous> (/private/tmp/frontend-platform/frontend-platform/node_modules/webpack-cli/lib/webpack-cli.js:1672:7)
/tmp/frontend-platform/frontend-platform (master ✘)✹ ᐅ

@davidjoy davidjoy changed the title upgrade to node16 build: upgrade to node16 Dec 2, 2021
@davidjoy davidjoy merged commit 950d51e into master Dec 2, 2021
@davidjoy davidjoy deleted the bpant/node-16-upgrade branch December 2, 2021 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants