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
Commitlint cli running 19.0.3 gives error #3950
Comments
Please provide online reproduction, not just error messages, that doesn't help. |
Our repo is seeing this issue as well on the latest release. Hopefully this is what you mean by online repo. I have created a public repo that shows the issue: Here is an example of the failure: You can trigger a workflow that fails here: |
@moran-inadvantag I don't think we support legacy node v14, node v18+ is required. |
Maybe we should detect the version before running, and fail fast in case it's too old? |
Something like this? https://gist.github.com/knocte/f78f8f60800e54bce59110138389105b |
@escapedcat @JounQin what do you guys think? |
Hmm... Didn't |
If that was the case, wouldn't @moran-inadvantage have got a different error? |
The warning is occurred on installation AFAIK. |
So @moran-inadvantage didn't get this because he used it directly via |
This comment was marked as outdated.
This comment was marked as outdated.
So we need the "Unsupported engine" checks at runtime too, not just installation time. |
Ah no, same. Forgot to delete the user@machine ~/test npx @commitlint/cli
Need to install the following packages:
@commitlint/cli
Ok to proceed? (y) y
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@commitlint/cli@19.2.1',
npm WARN EBADENGINE required: { node: '>=v18' },
npm WARN EBADENGINE current: { node: 'v16.14.0', npm: '8.3.1' }
npm WARN EBADENGINE } |
So why did @moran-inadvantage not get the above, @escapedcat ? |
So, should/can we convert that warning into an error? |
Hm, can't decide. Apparently other packages are also using different strategies: npx prettier
prettier requires at least version 14 of Node, please upgrade npx eslint
Oops! Something went wrong! :(
ESLint: 8.56.0
TypeError: Module.createRequire is not a function
at Object.<anonymous> (/test/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2404:26)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/test/node_modules/eslint/lib/cli-engine/cli-engine.js:33:5)
at Module._compile (internal/modules/cjs/loader.js:778:30) |
The ideal would be the best of both worlds:
At least this way people would not report bugs that are related to this, and would try to upgrade first. |
Steps to Reproduce
1. Install commitlint and set up config (ref https://commitlint.js.org/reference/configuration.html) npm install --userconfig=./.npmrc -g commitlint-config 2. Run commitlint this works with v18.6.1 as expected
Current Behavior
Expected Behavior
Affected packages
Possible Solution
No response
Context
No response
commitlint --version
19.0.3
git --version
2.25.1
node --version
18.x
The text was updated successfully, but these errors were encountered: