Fresh install of 1.88.1 fails on startup: '@opentelemetry/semantic-conventions' has no default export
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, node.js
調査の方向性
まず package.json と、@opentelemetry/semantic-conventions に関する dist/cli.mjs の import を読みます。issue には、失敗するデフォルト import と、1.44.0 に解決される依存関係の範囲が示されています。パッケージが ESM exports をどのように公開しているかを確認し、その後、クリーンなプレフィックスにパッケージ化してインストールし、cmd --version を実行します。新規インストールが起動してバージョンを表示すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
After a fresh global npm install of command-code@latest (1.88.1), cmd cannot start. Even cmd --version exits immediately with a module-loading SyntaxError, so the CLI is unusable until the dependency is manually downgraded.
Expected Behavior
A fresh npm i -g command-code@latest should produce a working CLI. cmd --version should print 1.88.1, and cmd should start normally without any manual patching.
Actual Behavior
Every invocation of cmd (including cmd --version) crashes before startup:
SyntaxError: The requested module '@opentelemetry/semantic-conventions' does not provide an export named 'default'
at #asyncInstantiate (node:internal/modules/esm/module_job:463:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:561:5)
at async node:internal/modules/esm/loader:650:26
at async file:///.../.local/lib/node_modules/command-code/dist/index.mjs:2:1757
Steps to reproduce the issue
- npm i -g command-code@latest
- cmd --version
- The CLI exits immediately with the SyntaxError above.
Command Code Version
1.88.1
Operating System
macOS
Terminal/IDE
Apple Terminal
Shell
zsh
Session file (optional)
N/A — the CLI crashes before a session can be created.
Fix prompt (optional)
In dist/cli.mjs, @opentelemetry/semantic-conventions is imported with a default import:
import ze from "@opentelemetry/semantic-conventions";
...
({ATTR_SERVICE_NAME: ZD, ATTR_SERVICE_VERSION: eN} = ze)
The dependency range in package.json is ^1.30.0, which now resolves to 1.44.0.
That version exposes its ESM entry (dist/index.mjs) via the default export
condition, and the ESM entry has no default export, so module loading fails.
Fix by importing the two named exports directly:
import { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION } from "@opentelemetry/semantic-conventions";
Alternatively, pin @opentelemetry/semantic-conventions to 1.43.0, which resolves
to the CJS build in ESM contexts and still provides a default export.
Verify by packing the package, installing it into a clean prefix with a fresh
npm install, and running cmd --version.
Additional context
- Node.js: v26.8.1
- npm: 11.19.0
- Fresh install resolves @opentelemetry/[email protected] due to the ^1.30.0 range.
- 1.44.0 exports require -> dist/index.cjs but default -> dist/index.mjs; the ESM entry only has named exports. Earlier versions such as 1.43.0 resolve to the CJS build in ESM contexts, so the default import works.
- Replacing the installed @opentelemetry/semantic-conventions with 1.43.0 makes cmd --version work again.
- The other OpenTelemetry imports (resources, sdk-trace-node, exporter-trace-otlp-http) still provide a CJS default and are not affected.****
- 主要言語
- 言語のデータがありません
- スター
- 4.2k
- フォーク
- 377
- 平均マージ
- 3日 15時間
- マージ済み PR(30日)
- 8
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CommandCodeAI/command-code のほかの issue
-
Provider /v1/messages rejects role:"system" inside messages[] — Claude Code ≥ 2.1.154 incompatibleオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
CommandCodeAI/command-code#1085 ·
メンテナーはふだん 1 日以内に返信
-
Feature request: auto-reconnect remote control (/rc) after restart対応中かも @aliarain が 12 日前に担当しました。 オープンp2
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
CommandCodeAI/command-code#992 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CommandCodeAI/command-code#933 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CommandCodeAI/command-code#855 ·
メンテナーはふだん 1 日以内に返信
-
grep tool passes empty file type to ripgrep対応中かも @ahmadbilaldev が 11 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CommandCodeAI/command-code#655 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
CommandCodeAI/command-code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
pingdotgg/t3code#30228 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
jejjohnson/gaussx#719 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
canonical/temporal-worker-k8s-operator#135 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
5.0.x backport enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
spring-cloud/spring-cloud-function#1507 ·
メンテナーはふだん 1 日以内に返信