Code Monkey home page Code Monkey logo

Comments (4)

justinwilaby avatar justinwilaby commented on August 16, 2024 2

Hi @wolkyura -

TL;DR: This is intentional and not a mistake, however a newer version of Node is very likely to work just fine. I have tested Node 22 and the commands I tested worked without issue.

For full transparency, we are working to remedy several issues around the node version used for the CLI and the @oclif/plugin-plugins version we are using.

  1. There is currently no way to verify that an installed plugin will work with the node version or the CLI version used by the host. Ref this issue. This means that oclif allows potentially incompatible plugins to be installed without warning the user.
  2. There is currently no officially supported way to update Node independently of the original install for the CLI. That is, if you install the CLI and it uses Node 16.20.1 and later on this version is found to contain a vulnerability, you must wait for a release from the Heroku team and reinstall the CLI using the installer to get the patched Node version. There are workarounds to this such as using npm i -g heroku@latest but this is not officially supported.
  3. @oclif/plugin-plugins uses Yarn to install plugins. Yarn installs all devDependencies that are found in the package.json and fails the install if one of the devDependencies has an engine mismatch. Of course this is bad since a local dev environment can sometimes require Node 22 while the production build targets Node > 16. Plus, there is the added overhead of installing packages that are never used. This has been fixed and we'll be adopting the new version as part of our updates.

These are the items we're aware of and are discussing solutions for. Part of the discussion is maintaining Node LTS compatibility so our CLI will never require a version of Node that is no longer maintained.

A Note about item 3 in the above list: The workaround I am recommending for plugin authors is to omit devDependencies in the package.json and either remove yarn.lock altogether or rebuild it from the package.json that excludes devDependencies before publishing to NPM. This is the 100% reliable way to prevent issues until we can adopt the fix by the oclif team.

from heroku-cli.

justinwilaby avatar justinwilaby commented on August 16, 2024 1

Hi @Enase -

The Heroku team has plans to update to Node LTS sometime later this year. If you need to run the cli using a newer version of Node, most commands prepackaged with the default install should work. Of course, you would also have to use npm i -g heroku which it looks like you are already doing. :)

from heroku-cli.

wolkyura avatar wolkyura commented on August 16, 2024 1

Thanks @justinwilaby for the detailed reply! Using npm to install heroku works just fine.

from heroku-cli.

wolkyura avatar wolkyura commented on August 16, 2024

Hey @justinwilaby

The v8.8.0 release introduced this change 7ba13da which forces node16, do you think it was done by mistake and it should be >=16.20.0 and not ~16.20.0?

from heroku-cli.

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.