MiniMax-AI / MiniMax-AI/minimax-code

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

Open
#173 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug cli
Dominant language
TypeScript
Stars
1.3k
Forks
141
Avg merge
2h 45m
Merged PRs (30d)
46

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start with the updater path invoked by mcode update, reproduce the failure using the pnpm-generated npm shim, and trace how it locates npm-cli.js. Done means the updater can complete with this npm layout, with coverage for the reported macOS setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.