Skip to content

v14.5.0 regression with npm #34162

Description

@SheetJSDev
  • Version: v14.5.0
  • Platform: OSX and Linux 4.15.0-1028-gcp
  • Subsystem:

What steps will reproduce the bug?

$ npm install -g npm@4.3.0
$ npm install -g mocha@2.x voc

How often does it reproduce? Is there a required condition?

Every single time

What is the expected behavior?

Installs correctly (and you can verify this using node v14.4.0)

What do you see instead?

npm ERR! node v14.5.0
npm ERR! npm  v4.3.0
npm ERR! cb.apply is not a function

Additional information

Since this works in 14.4.0 and in 12.x, I'm inclined to believe this is a nodejs regression.

Activity

  1. added
    fsIssues and PRs related to file-system APIs and the fs module.
    on Jul 1, 2020
  2. addaleax commented on Jul 1, 2020

    @addaleax
    Member

    This is happening because npm@4.3.0 uses an outdated, unsupported version of graceful-fs, which doesn’t have isaacs/node-graceful-fs@168bdb8. This is a problem because #33945 adds usage of the bigint option.

    You should be able to address this by updating npm, ideally to a supported version.

  3. SheetJSDev commented on Jul 1, 2020

    @SheetJSDev
    ContributorAuthor

    Thanks for the explanation! And yes, updating to npm >= 6.10.0 resolves the issue

  4. poojaynaik commented on Jul 23, 2020

    @poojaynaik

    Hello SheetJSDev,

    Can you please tell me how did you upgrade the npm?
    my Node version is v14.6.0 and NPM is 4.6.1
    I manually degrade the npm version for some reason and now I wanted to upgrade it to the latest.
    I tried doing it manually using commands like npm install -g npm@latest and npm install -g npm@5.6.0 but getting error as npm ERR! cb.apply is not a function
    Can you please assist me? thank you in advance.

  5. SheetJSDev commented on Jul 23, 2020

    @SheetJSDev
    ContributorAuthor

    We didn't really "fix" the problem, all we did was just skip downgrading. SheetJS/sheetjs@93ec51e shows what we did for travis -- the script only messes with npm if the node version is in the v0.8.x range

    To bail out of a broken npm situation, you can use something like nvm or n to switch node+npm versions (go down to 12, back up to 14) or just uninstall and reinstall from the official nodejs.org releases.

  6. poojaynaik commented on Jul 27, 2020

    @poojaynaik
  7. added
    npmIssues and PRs related to the npm client dependency or the npm registry.
    on Jul 27, 2020
  8. DenisCor commented on Mar 2, 2021

    @DenisCor

    node v14.16.0 and npm 7.6.0 AND I STILL GET THIS STUPID ERROR!! reinstalled node, cleaned cache.. tried everything and no luck!

  9. DenisCor commented on Mar 2, 2021

    @DenisCor

    Thanks for the explanation! And yes, updating to npm >= 6.10.0 resolves the issue

    my npm is 7.6.0 and i still get this error

  10. ArchishmanSengupta commented on Mar 10, 2021

    @ArchishmanSengupta

    We didn't really "fix" the problem, all we did was just skip downgrading. SheetJS/sheetjs@93ec51e shows what we did for travis -- the script only messes with npm if the node version is in the v0.8.x range

    To bail out of a broken npm situation, you can use something like nvm or n to switch node+npm versions (go down to 12, back up to 14) or just uninstall and reinstall from the official nodejs.org releases.

    Can you elaborate on this? what is the command to solve the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to file-system APIs and the fs module.npmIssues and PRs related to the npm client dependency or the npm registry.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions