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

[Package Issue]: OpenJS.NodeJS #151935

Closed
2 tasks done
geihob opened this issue May 2, 2024 · 3 comments
Closed
2 tasks done

[Package Issue]: OpenJS.NodeJS #151935

geihob opened this issue May 2, 2024 · 3 comments
Labels
Area-External Installer-Issue Issue with the package's installer.

Comments

@geihob
Copy link

geihob commented May 2, 2024

Please confirm these before moving forward

  • I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
  • I have not been informed if the issue is resolved in a preview version of the winget client.

Category of the issue

Other

Brief description of your issue

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

Steps to reproduce

winget install --id OpenJS.NodeJS

Actual behavior

npm command usage error

Expected behavior

npm command usage normally

Environment

Windows 程序包管理器 v1.7.11132
版权所有 (C) Microsoft Corporation。保留所有权利。

Windows: Windows.Desktop v10.0.22631.3527
系统体系结构: X64
软件包: Microsoft.DesktopAppInstaller v1.22.11132.0

Screenshots and Logs

No response

@geihob geihob added the Issue-Bug It either shouldn't be doing this or needs an investigation. label May 2, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage This work item needs to be triaged by a member of the core team. label May 2, 2024
@Trenly
Copy link
Contributor

Trenly commented May 2, 2024

All WinGet does is download the installer and run it with the /passive /norestart which is the default way to silently install an msi.

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.

@microsoft-github-policy-service microsoft-github-policy-service bot added Installer-Issue Issue with the package's installer. Area-External and removed Needs-Triage This work item needs to be triaged by a member of the core team. labels May 2, 2024
@stephengillie stephengillie removed the Issue-Bug It either shouldn't be doing this or needs an investigation. label May 2, 2024
@stephengillie
Copy link
Collaborator

This appears to be normal program operation, not quite a bug. If this is in error, please @ me and I'll revert.

@geihob
Copy link
Author

geihob commented May 2, 2024

Testing the new version node-v22.1.0-x64.msi is normal.

@geihob geihob closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-External Installer-Issue Issue with the package's installer.
Projects
None yet
Development

No branches or pull requests

3 participants