Giter Site home page Giter Site logo

Comments (19)

JounQin avatar JounQin commented on June 9, 2024 1

Please provide online reproduction, not just error messages, that doesn't help.

from commitlint.

JounQin avatar JounQin commented on June 9, 2024 1

@moran-inadvantag I don't think we support legacy node v14, node v18+ is required.

from commitlint.

JounQin avatar JounQin commented on June 9, 2024 1

The warning is occurred on installation AFAIK.

from commitlint.

moran-inadvantage avatar moran-inadvantage commented on June 9, 2024

Our repo is seeing this issue as well on the latest release. Hopefully this is what you mean by online repo.

@JounQin

I have created a public repo that shows the issue:
https://github.com/moran-inadvantage/commit_lint_issue_3950

Here is an example of the failure:
https://github.com/moran-inadvantage/commit_lint_issue_3950/actions/runs/8287030551/job/22678414864

You can trigger a workflow that fails here:
https://github.com/moran-inadvantage/commit_lint_issue_3950/actions/workflows/commit-validate.yml

from commitlint.

knocte avatar knocte commented on June 9, 2024

node v18+ is required.

Maybe we should detect the version before running, and fail fast in case it's too old?

from commitlint.

knocte avatar knocte commented on June 9, 2024

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

from commitlint.

knocte avatar knocte commented on June 9, 2024

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?

from commitlint.

JounQin avatar JounQin commented on June 9, 2024

Hmm... Didn't engines field warning about the incompatible usage? I'm not sure whether we need to check it another time.

from commitlint.

knocte avatar knocte commented on June 9, 2024

Hmm... Didn't engines field warning about the incompatible usage? I'm not sure whether we need to check it another time.

If that was the case, wouldn't @moran-inadvantage have got a different error?

from commitlint.

escapedcat avatar escapedcat commented on June 9, 2024

This is the error you get when you install it with a wrong version:

image
 user@machine ~/test npm install --save-dev @commitlint/{cli,config-conventional}
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@commitlint/[email protected]',
npm WARN EBADENGINE   required: { node: '>=v18' },
npm WARN EBADENGINE   current: { node: 'v16.14.0', npm: '8.3.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@commitlint/[email protected]',
npm WARN EBADENGINE   required: { node: '>=v18' },
npm WARN EBADENGINE   current: { node: 'v16.14.0', npm: '8.3.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@commitlint/[email protected]',
npm WARN EBADENGINE   required: { node: '>=v18' },
npm WARN EBADENGINE   current: { node: 'v16.14.0', npm: '8.3.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@commitlint/[email protected]',
npm WARN EBADENGINE   required: { node: '>=v18' },
npm WARN EBADENGINE   current: { node: 'v16.14.0', npm: '8.3.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@commitlint/[email protected]',
npm WARN EBADENGINE   required: { node: '>=v18' },
npm WARN EBADENGINE   current: { node: 'v16.14.0', npm: '8.3.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@commitlint/[email protected]',
npm WARN EBADENGINE   required: { node: '>=v18' },
npm WARN EBADENGINE   current: { node: 'v16.14.0', npm: '8.3.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@commitlint/[email protected]',
npm WARN EBADENGINE   required: { node: '>=v18' },
npm WARN EBADENGINE   current: { node: 'v16.14.0', npm: '8.3.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=16.17' },
npm WARN EBADENGINE   current: { node: 'v16.14.0', npm: '8.3.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@commitlint/[email protected]',
npm WARN EBADENGINE   required: { node: '>=v18' },
npm WARN EBADENGINE   current: { node: 'v16.14.0', npm: '8.3.1' }
npm WARN EBADENGINE }
...

I think this should be enough, no?

from commitlint.

knocte avatar knocte commented on June 9, 2024

So @moran-inadvantage didn't get this because he used it directly via npx instead of installing?

from commitlint.

escapedcat avatar escapedcat commented on June 9, 2024

Yeah, that could be the case:

user@machine ~/test npx @commitlint/cli
@commitlint/[email protected] - Lint your commit messages

[input] reads from stdin if --edit, --env, --from and --to are omitted

Options:
  -c, --color          toggle colored output                                                                                                                                                                                                       [boolean] [default: true]
  -g, --config         path to the config file
...

from commitlint.

knocte avatar knocte commented on June 9, 2024

So we need the "Unsupported engine" checks at runtime too, not just installation time.

from commitlint.

escapedcat avatar escapedcat commented on June 9, 2024

Ah no, same. Forgot to delete the node_modules in my test folder...

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/[email protected]',
npm WARN EBADENGINE   required: { node: '>=v18' },
npm WARN EBADENGINE   current: { node: 'v16.14.0', npm: '8.3.1' }
npm WARN EBADENGINE }

from commitlint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.