Skip to content
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

[BUG] Node 8.9.4 is installed but npm not working #2652

Closed
denzelWashington opened this issue Feb 8, 2021 · 2 comments · Fixed by npm/run-script#21 or #2654
Closed

[BUG] Node 8.9.4 is installed but npm not working #2652

denzelWashington opened this issue Feb 8, 2021 · 2 comments · Fixed by npm/run-script#21 or #2654
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release

Comments

@denzelWashington
Copy link

I'm getting the same problem too.
I have node 8.9.4 installed but when i run in jenkinsfile npm -v , im getting this error

TypeError: Cannot destructure property `stat` of 'undefined' or 'null'.
    at Object.<anonymous> (***********************/node_modules/npm/node_modules/@npmcli/node-gyp/lib/index.js:2:29)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (**********************/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js:4:55)
    at Module._compile (module.js:643:30)
**********************************/node_modules/npm/node_modules/@npmcli/config/lib/index.js:163
      throw new Error('call config.load() before reading values')

i have downgraded npm to npm@latest-6 but doesn't work for me

@denzelWashington denzelWashington added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Feb 8, 2021
@ljharb
Copy link
Collaborator

ljharb commented Feb 8, 2021

npm 7 requires node 10, so on node 8, you can't run npm install -g npm. At this point you probably have to reinstall node itself.

If you're using nvm, you can use nvm install-latest-npm to avoid this; otherwise atm you'd have to know to run npm install -g npm@6.

ljharb added a commit to ljharb/cli that referenced this issue Feb 8, 2021
ljharb added a commit to ljharb/cli that referenced this issue Feb 8, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 8, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
@ljharb ljharb reopened this Feb 10, 2021
@ljharb
Copy link
Collaborator

ljharb commented Feb 10, 2021

Actually, closing this in favor of #2623.

@ljharb ljharb closed this as completed Feb 10, 2021
ljharb added a commit to ljharb/cli that referenced this issue Feb 10, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 10, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 10, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 10, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 10, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 11, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 12, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 12, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 12, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
ljharb added a commit to ljharb/cli that referenced this issue Feb 12, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.
wraithgar pushed a commit to ljharb/cli that referenced this issue Feb 12, 2021
In this node version, fall back to `util.promisify` of the callback version.

Maybe fixes npm#2623. Maybe fixes npm#2652. Maybe fixes npm#2625.

PR-URL: npm#2654
Credit: @ljharb
Close: npm#2654
Reviewed-by: @wraithgar, @ruyadorno
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release
Projects
None yet
2 participants