loopbackio / loopbackio/loopback-next

In an extension, Loopback CLI depends on @loopback/core in list of dependencies

オープン
#9,476 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug
主要言語
TypeScript
スター
5.1k
フォーク
1.1k
平均マージ
2日 21時間
マージ済み PR(30日)
27

説明

### Describe the bug

Running CLI commands such as `lb4 model` in a loopback extension cause the commands to be aborted.

```No change to package.json was detected. No package manager install will be executed.
Generation is aborted: Error: No `@loopback/core` package found in the "dependencies" section of C:\Users\Ben\Documents\dev\customer-service\extensions\intercom\package.json. The command must be run in a LoopBack project.
```

This is because `@loopback/core` is not listed in dependencies. Yes it is both a `devDependency` and a `peerDependency` in a loopback extension. This was last discussed in #2163 and implemented in #2166.

Wouldn't it be a better developer experience if the command accepted `@loopback/core` as a `peerDependency`?

### Logs

```shell
$ lb4 model

No change to package.json was detected. No package manager install will be executed.
Generation is aborted: Error: No `@loopback/core` package found in the "dependencies" section of C:\Users\Ben\Documents\dev\customer-service\extensions\intercom\package.json. The command must be run in a LoopBack project.
```

### Additional information

_No response_

### Reproduction

n/a

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

CLI エントリポイント `lb4 model` から開始し、不足しているパッケージ `@loopback/core` を報告する依存関係チェックを追跡します。`@loopback/core` が peerDependency である LoopBack 拡張機能でコマンドを再現します。完了条件は、`dependencies` にそれを要求せずにコマンドが受け入れられることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
nodejs, typescript
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。