diff --git a/code/addons/themes/postinstall.js b/code/addons/themes/postinstall.js index c84a4e88e4b4..01a9b3151e89 100644 --- a/code/addons/themes/postinstall.js +++ b/code/addons/themes/postinstall.js @@ -2,7 +2,7 @@ const { spawn } = require('child_process'); const PACKAGE_MANAGER_TO_COMMAND = { npm: 'npx', - yarn1: 'yarn dlx', + yarn1: 'npx', yarn2: 'yarn dlx', pnpm: 'pnpm dlx', }; diff --git a/code/lib/cli/src/add.ts b/code/lib/cli/src/add.ts index a163e1f1e34f..71437b314b1c 100644 --- a/code/lib/cli/src/add.ts +++ b/code/lib/cli/src/add.ts @@ -91,6 +91,6 @@ export async function add( await writeConfig(main); if (!options.skipPostinstall && isStorybookAddon) { - await postinstallAddon(addonName, { packageManager: pkgMgr }); + await postinstallAddon(addonName, { packageManager: packageManager.type }); } }