breaking: require Node.js version >= 20.19#1671
breaking: require Node.js version >= 20.19#1671SergeAstapov merged 3 commits intoember-learn:mainfrom
Conversation
…rser issue - Reported in ember-learn#1669
- Without this the CI fails, because it installs incorrect dependencies
- Fixes ember-learn#1669 Caused by: ``` require() of ES Module .../.pnpm/@handlebars+parser@file+..+handlebars-parser/node_modules/@handlebars/parser/dist/cjs/index.js not supported. Instead change the require of index.js in null to a dynamic import() which is available in all CommonJS modules. ``` When using older node in consuming app.
2aa71d3 to
610a78d
Compare
| }, | ||
| "engines": { | ||
| "node": ">= 18" | ||
| "node": ">= 20.19" |
There was a problem hiding this comment.
@MichalBryxi why not
| "node": ">= 20.19" | |
| "node": ">= 20.x" |
There was a problem hiding this comment.
Anything below 20.19 results in following error in consuming app for me:
> docs-app-for-ember-intl@1.5.6 start /Users/michal/ember/ember-intl/docs/ember-intl
> ember serve
require() of ES Module /Users/michal/ember/ember-intl/node_modules/.pnpm/@handlebars+parser@file+..+handlebars-parser/node_modules/@handlebars/parser/dist/cjs/index.js not supported.
Instead change the require of index.js in null to a dynamic import() which is available in all CommonJS modules.
Stack Trace and Error Report: /var/folders/8q/yrjx_8s115q43r8w5qd90_m00000gn/T/error.dump.09dfcadbf87770bc232cc47d14bf82ae.log
ELIFECYCLE Command failed with exit code 1.
node --version
v20.18.0
IDK how to signify that the consuming app should have certain node version, but sounds reasonable to impose minimal node version also on this repo to not bump into the same set of issues in, say, the testing app (which I think is actually happening).
Related Discord convo.
There was a problem hiding this comment.
Ah yeah, this addon's CI itself is having issue with node < 20.19: https://github.com/ember-learn/ember-cli-addon-docs/actions/runs/14612606117/job/40993520690?pr=1672 (different PR that does not have these patches)
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18.x | ||
| node-version: 20.19.x |
There was a problem hiding this comment.
why not
| node-version: 20.19.x | |
| node-version: 20.x |
so it could be get latest v20 shuld there be any fixes/new versions available
|
Humble ping @SergeAstapov |
|
Thank you @MichalBryxi! |
There is an incompatibility with the two packages: * ember-learn/ember-cli-addon-docs#1671 * ember-learn/ember-cli-addon-docs#1669 * https://github.com/handlebars-lang/handlebars-parser/releases/tag/v2.2.1-%40handlebars%2Fparser
Caused by:
When using older node in consuming app.
This PR is based on the actual fix PR for this very repo << it should be reviewed & accepted first. This is just to make sure the build will be green. I can retarget separately if it makes it easier to read.