Skip to content

npm broken due to prefix option #1514

@hohwille

Description

@hohwille

Actual behavior

ide install ng
...
Running command 'D:\projects\IDEasy\software\npm\bin\npm.cmd' with arguments 'install' '-g' '@angular/cli@21.0.0-next.5' '--prefix' 'D:\projects\IDEasy\software\node' ...
node:internal/modules/cjs/loader:1386
  throw err;
  ^

Error: Cannot find module 'D:\projects\IDEasy\software\npm\bin\node_modules\npm\bin\npm-prefix.js'
    at Function._resolveFilename (node:internal/modules/cjs/loader:1383:15)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1025:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1030:22)
    at Function._load (node:internal/modules/cjs/loader:1192:37)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
    at node:internal/main/run_main_module:36:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v22.20.0
node:internal/modules/cjs/loader:1386
  throw err;
  ^

Error: Cannot find module 'D:\projects\IDEasy\software\npm\bin\node_modules\npm\bin\npm-cli.js'
    at Function._resolveFilename (node:internal/modules/cjs/loader:1383:15)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1025:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1030:22)
    at Function._load (node:internal/modules/cjs/loader:1192:37)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
    at node:internal/main/run_main_module:36:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v22.20.0
Running command 'D:\projects\IDEasy\software\npm\bin\npm.cmd' with arguments 'install' '-g' '@angular/cli@21.0.0-next.5' '--prefix' 'D:\projects\IDEasy\software\node'
failed with exit code 1!
Step 'ide' ended with failure.
ide (install,ng) failed after PT1.936S

Running command 'D:\projects\IDEasy\software\npm\bin\npm.cmd' with arguments 'install' '-g' '@angular/cli@21.0.0-next.5' '--prefix' 'D:\projects\IDEasy\software\node'
failed with exit code 1!

Error: IDEasy failed with exit code 1

Reproduce

ide install ng

Expected behavior

Command should work without error.

IDEasy status

IDE_ROOT is set to D:/projects
IDE_HOME is set to D:/projects/project
You are online.
Your settings are up-to-date.
Your version of IDEasy is 2025.09.001-09_29_13-SNAPSHOT.
You are using a SNAPSHOT version of IDEasy. For stability consider switching to a stable release via 'ide upgrade --mode=stable'
Your version of IDEasy is 2025.09.001-09_29_13-SNAPSHOT but version 2025.07.001-20250723.025205-3 is available. Please run the following command to upgrade to the latest version:
ide upgrade
Your operating system is windows(10.0)@x64 [Windows 11@amd64]
Successfully completed ide (status)

Related/Dependent issues

#1513

Comments/Hints

No response

Metadata

Metadata

Labels

blockerbug issue that blocks end-users from using IDEasyinternalNothing to be added to CHANGELOG, only internal storynpmnode package manager

Type

Projects

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions