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

[docs] Mention necessity of using node v22 #3824

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

michielbdejong
Copy link

With node v20 the npm ci command fails:

$ npm ci
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead

> [email protected] postinstall
> npm run build


> [email protected] build
> lerna run build

lerna notice cli v8.1.9

 Lerna (powered by Nx)   Running target build for 6 projects

   ✖  @inrupt/solid-client-authn-core:build
      > @inrupt/[email protected] build
      > rollup --config rollup.config.mjs
      
      [!] SyntaxError: Unexpected token 'with'
          at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:118:18)
          at callTranslator (node:internal/modules/esm/loader:273:14)
          at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:30)
          at link (node:internal/modules/esm/module_job:76:21)
      
      
      npm ERR! Lifecycle script `build` failed with error: 
      npm ERR! Error: command failed 
      npm ERR!   in workspace: @inrupt/[email protected] 
      npm ERR!   at location: /Users/michiel/gh/inrupt/solid-client-authn-js/packages/core 

After nvm use 22 this error no longer happens.

This PR fixes bug #.

  • I've added a unit test to test for potential regressions of this bug.
  • The changelog has been updated, if applicable.
  • Commits in this PR are minimal and have descriptive commit messages.

New feature description

Checklist

  • All acceptance criteria are met.
  • Relevant documentation, if any, has been written/updated.
  • The changelog has been updated, if applicable.
  • New functions/types have been exported in index.ts, if applicable.
  • Commits in this PR are minimal and have descriptive commit messages.

This PR bumps the version to .

Release Steps

  1. Look at the CHANGELOG.md to determine whether the release should be a major, minor, or patch release. Coordinate with the team to ensure the next version is agreed upon.
  2. Run npm run lerna-version -- <major|minor|patch> with the decided on version.
  3. Update the CHANGELOG.md to release the latest the version, and set the release date.
  4. Commit the changes on a release/vX.Y.Z branch
  5. Push to GitHub, create a PR, and merge once CI passes.
  6. Create a release on GitHub for the new version, using a combination of the release notes from the CHANGELOG.md and the automatically generated changes.

With node v20 the `npm ci` command fails:
```
$ npm ci
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead

> [email protected] postinstall
> npm run build


> [email protected] build
> lerna run build

lerna notice cli v8.1.9

 Lerna (powered by Nx)   Running target build for 6 projects

   ✖  @inrupt/solid-client-authn-core:build
      > @inrupt/[email protected] build
      > rollup --config rollup.config.mjs
      
      [!] SyntaxError: Unexpected token 'with'
          at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:118:18)
          at callTranslator (node:internal/modules/esm/loader:273:14)
          at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:30)
          at link (node:internal/modules/esm/module_job:76:21)
      
      
      npm ERR! Lifecycle script `build` failed with error: 
      npm ERR! Error: command failed 
      npm ERR!   in workspace: @inrupt/[email protected] 
      npm ERR!   at location: /Users/michiel/gh/inrupt/solid-client-authn-js/packages/core 
```
After `nvm use 22` this error no longer happens.
@michielbdejong michielbdejong requested a review from a team as a code owner January 13, 2025 09:35
@NSeydoux
Copy link
Contributor

Hi @michielbdejong , thanks for reporting this.

I cannot reproduce on a fresh clone of the repository:

➜  solid-client-authn-js git:(main) fnm current
v20.17.0
➜  solid-client-authn-js git:(main) npm ci     
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead

> [email protected] postinstall
> npm run build


> [email protected] build
> lerna run build

lerna notice cli v8.1.9

   ✔  @inrupt/solid-client-authn-core:build (4s)
   ✔  @inrupt/oidc-client-ext:build (3s)
   ✔  @inrupt/solid-client-authn-node:build (4s)
   ✔  @inrupt/solid-client-authn-browser:build (10s)
   ✔  browser-in-bundle:build (8s)
   ✔  test-app:build (26s)

———————————————————————————————————————————————————————————————————————————————

 Lerna (powered by Nx)   Successfully ran target build for 6 projects (44s)


added 1878 packages, and audited 1905 packages in 1m

276 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Can you specify which version of npm and node are used? And can you confirm this is against the latest version of the codebase?

@NSeydoux
Copy link
Contributor

By the way, note that we are running CI on all the supported Node versions (18, 20, 22): https://github.com/inrupt/solid-client-authn-js/actions/runs/12751061817

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.

2 participants