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] After the latest node Stable release, why can't I see npm? #5812

Open
dong-lufei opened this issue May 9, 2024 · 2 comments
Open

[Bug] After the latest node Stable release, why can't I see npm? #5812

dong-lufei opened this issue May 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dong-lufei
Copy link

# dong @ lufei in E:\test [09:18:49]
$ scoop install main/nodejs-lts
Installing 'nodejs-lts' (20.13.0) [64bit] from main bucket
Loading node-v20.13.0-win-x64.7z from cache.
Checking hash of node-v20.13.0-win-x64.7z ... ok.
Extracting node-v20.13.0-win-x64.7z ... done.
Linking D:\scoop_user_apps\apps\nodejs-lts\current => D:\scoop_user_apps\apps\nodejs-lts\20.13.0
Persisting bin
Persisting cache
Running post_install script...
'nodejs-lts' (20.13.0) was installed successfully!
# dong @ lufei in E:\test [09:19:09]
$ node -v
v20.13.0
# dong @ lufei in E:\test [09:19:29]
$ npm -v
node:internal/modules/cjs/loader:1148
  throw err;
  ^

Error: Cannot find module 'D:\scoop_user_apps\persist\nodejs-lts\bin\node_modules\npm\bin\npm-cli.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.13.0
# dong @ lufei in E:\test [09:19:32] C:1

Bug Report

Current Behavior

Expected Behavior

Additional context/output

Possible Solution

System details

Windows version: [e.g. 7, 8, 10, 11]
11
OS architecture: [e.g. 32bit, 64bit, arm64]

PowerShell version: [output of "$($PSVersionTable.PSVersion)"]
PowerShell 7.4.2
Additional software: [(optional) e.g. ConEmu, Git]

Scoop Configuration

//# Your configuration here
@dong-lufei dong-lufei added the bug Something isn't working label May 9, 2024
@niheaven niheaven transferred this issue from ScoopInstaller/Scoop May 9, 2024
@niheaven
Copy link
Member

niheaven commented May 9, 2024

Upstream error (npm/cli#7271) and was fixed in npm/cli#7450 (npm v10.7.0)

@niheaven
Copy link
Member

niheaven commented May 9, 2024

Temporal solution: copy node_modules\npm to bin\node_modules\npm and run npm update npm -g, after updating, move back npm folder and move bin\npm.*, bin\npx.* to root folder of nodejs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants