storybookjs/storybook

[Bug]: Automigration addReact fails with `package.json` overrides

オープン

#21,271 opened on 2023/02/27

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (10,058 件のフォーク)batch import
bugclihelp wantedsev:S3

Repository metrics

Stars
 (89,909 個のスター)
PR merge metrics
 (平均マージ 7d 22h) (30d で 184 merged PRs)

説明

Describe the bug

Error:
npm ERR! code EOVERRIDE
npm ERR! Override for react@* conflicts with direct dependency
npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xxx/.npm/_logs/2023-02-23T13_19_13_353Z-debug-0.log

Summary: The package.json has a overrides field, which defines react:

"overrides": {
	"react": "^18.0.0"
}

This hinders the addReact automigration to run and the sb upgrade script aborts. The error also leads for sb init to fail, because React is installed automatically without asking the user.

To Reproduce

https://github.com/bitwarden/clients per @valentinpalkovic

System

No response

Additional context

No response

コントリビューターガイド