Skip to content

[Bug]: updater fails to locate npm-cli.js when npm is managed by pnpm #173

Description

@hjgyuhuk

Product or interface

CLI - interactive TUI

Version

0.4.12

Platform

macOS

OS version and architecture

macOS 27 arm64

Issue area

Startup / install / update

Desktop log upload ID (optional)

No response

Steps to reproduce

MiniMax Code is installed successfully and runs normally:
curl -fsSL https://filecdn.minimax.chat/public/install.sh | bash

mcode --version
0.4.12

However, when the updater tries to update MiniMax Code, it fails with:

mcode update

Cannot locate npm-cli.js for the owned npm executable: /Volumes/KIOXIA/Applications/tools/.pnpm-home/npm
npm/pnpm layout

My npm executable is managed by pnpm and is located at:

/Volumes/KIOXIA/Applications/tools/.pnpm-home/npm

The npm executable is a shell shim generated by pnpm:

#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

if [ -x "$basedir/node" ]; then
  exec "$basedir/node" "$basedir/nodejs/26.3.1/lib/node_modules/npm/bin/npm-cli.js" "$@"
else
  exec node "$basedir/nodejs/26.3.1/lib/node_modules/npm/bin/npm-cli.js" "$@"
fi

The real npm CLI exists at:

/Volumes/KIOXIA/Applications/tools/.pnpm-home/nodejs/26.3.1/lib/node_modules/npm/bin/npm-cli.js

node -v
v26.3.1

npm -v
11.16.0

pnpm -v
10.32.1

Expected and actual behavior

The updater should either:

correctly resolve pnpm's npm shim to the real npm-cli.js, or
invoke the existing npm executable directly instead of assuming a particular npm filesystem layout.

Redacted error summary

Screenshots

No response

Before submitting

  • I have searched existing issues.
  • I have included my version and removed sensitive information.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions