Skip to content

Conversation

@shilman
Copy link
Member

@shilman shilman commented Mar 3, 2021

Issue: #12983

What I did

Add --legacy-peer-deps for NPM7 installs

How to test

See attached unit tests

I also tested it end-to-end in a sample app:

  580  npm init @vitejs/app
  581  cd vite-project/
  582  ~/projects/baseline/storybook/lib/cli/bin/index.js init

@shilman shilman added bug patch:yes Bugfix & documentation PR that need to be picked to main branch yarn / npm Yarn / npm acting weird labels Mar 3, 2021

getInstallArgs(): string[] {
if (!this.installArgs) {
const version = this.executeCommand('npm', ['--version']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if you need some .trim() here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested by hand -- doesn't seem to matter to semver, but good thought

@shilman shilman changed the title Add --legacy-peer-deps for NPM7 install CLI: Add --legacy-peer-deps for NPM7 install Mar 3, 2021
@shilman shilman merged commit d05fd3d into next Mar 3, 2021
@shilman shilman deleted the 12983-npm-legacy-peer-deps branch March 3, 2021 10:30
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Mar 3, 2021
shilman added a commit that referenced this pull request Mar 3, 2021
CLI: Add `--legacy-peer-deps` for NPM7 install
This was referenced Mar 14, 2021
@yannbf yannbf removed the patch:yes Bugfix & documentation PR that need to be picked to main branch label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug patch:done Patch/release PRs already cherry-picked to main/release branch yarn / npm Yarn / npm acting weird

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants