We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Other
npm cannot find module npm-cli.js.
> npm node:internal/modules/cjs/loader:1205 throw err; ^ Error: Cannot find module 'C:\Users\xx\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1202:15) at Module._load (node:internal/modules/cjs/loader:1027:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:187:14) at node:internal/main/run_main_module:28:49 { code: 'MODULE_NOT_FOUND', requireStack: [] } Node.js v22.0.0
winget install --id OpenJS.NodeJS
npm command usage error
npm command usage normally
Windows 程序包管理器 v1.7.11132 版权所有 (C) Microsoft Corporation。保留所有权利。 Windows: Windows.Desktop v10.0.22631.3527 系统体系结构: X64 软件包: Microsoft.DesktopAppInstaller v1.22.11132.0
No response
The text was updated successfully, but these errors were encountered:
All WinGet does is download the installer and run it with the /passive /norestart which is the default way to silently install an msi.
/passive /norestart
If do this yourself, you'll see the exact same behavior -
PS> iwr 'https://nodejs.org/dist/v22.0.0/node-v22.0.0-x64.msi' -OutFile 'Nodejs.msi'; PS> .\Nodejs.msi /passive /norestart | Restart terminal to update PATH PS> npm node:internal/modules/cjs/loader:1205 throw err; ^ Error: Cannot find module 'C:\Users\WDAGUtilityAccount\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1202:15) at Module._load (node:internal/modules/cjs/loader:1027:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:187:14) at node:internal/main/run_main_module:28:49 { code: 'MODULE_NOT_FOUND', requireStack: [] }
This means that it's an issue within the NodeJS installer and isn't something WinGet can fix.
Sorry, something went wrong.
This appears to be normal program operation, not quite a bug. If this is in error, please @ me and I'll revert.
Testing the new version node-v22.1.0-x64.msi is normal.
No branches or pull requests
Please confirm these before moving forward
Category of the issue
Other
Brief description of your issue
npm cannot find module npm-cli.js.
Steps to reproduce
winget install --id OpenJS.NodeJS
Actual behavior
npm command usage error
Expected behavior
npm command usage normally
Environment
Screenshots and Logs
No response
The text was updated successfully, but these errors were encountered: