[Bug] Netlify deploy fails with Could not resolve dependency: peer vite@">=3.0.0-alpha || >= 3.0.0" from @storybook/builder-vite@0.2.0
See original GitHub issueWhat version of vite
are you using?
vite@2.9.14
System info and storybook versions
This is from my local machine and does not match Netlify where the build is failing (running npm run build
locally works fine):
Environment Info:
System: OS: macOS 12.4 CPU: (8) arm64 Apple M1 Binaries: Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node Yarn: 1.22.17 - ~/.yarn/bin/yarn npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm Browsers: Chrome: 103.0.5060.114 Safari: 15.5 npmPackages: @storybook/addon-actions: ^6.5.9 => 6.5.9 @storybook/addon-essentials: ^6.5.9 => 6.5.9 @storybook/addon-interactions: ^6.5.9 => 6.5.9 @storybook/addon-links: ^6.5.9 => 6.5.9 @storybook/builder-vite: ^0.2.0 => 0.1.39 @storybook/testing-library: ^0.0.13 => 0.0.13 @storybook/vue3: ^6.5.9 => 6.5.9
Describe the Bug
When a build is triggered on Netlify, the following errors are shown in the build log and the build fails:
Installing NPM modules using NPM version 8.11.0
9:12:31 PM: npm ERR! code ERESOLVE
9:12:31 PM: npm ERR! ERESOLVE could not resolve
9:12:31 PM: npm ERR!
9:12:31 PM: Creating deploy upload records
9:12:31 PM: npm ERR! While resolving: @storybook/builder-vite@0.2.0
9:12:31 PM: npm ERR! Found: vite@2.9.14
9:12:31 PM: npm ERR! node_modules/vite
9:12:31 PM: npm ERR! dev vite@"^2.9.14" from the root project
9:12:31 PM: npm ERR! peer vite@">2.0.0-0" from @joshwooding/vite-plugin-react-docgen-typescript@0.0.4
9:12:31 PM: npm ERR! node_modules/@joshwooding/vite-plugin-react-docgen-typescript
9:12:32 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1 (https://ntl.fyi/exit-code-1)
9:12:31 PM: npm ERR! @joshwooding/vite-plugin-react-docgen-typescript@"0.0.4" from @storybook/builder-vite@0.2.0
9:12:31 PM: npm ERR! node_modules/@storybook/builder-vite
9:12:31 PM: npm ERR! dev @storybook/builder-vite@"^0.2.0" from the root project
9:12:31 PM: npm ERR! 2 more (@vitejs/plugin-vue, vite-plugin-pwa)
9:12:31 PM: npm ERR!
9:12:31 PM: npm ERR! Could not resolve dependency:
9:12:31 PM: npm ERR! peer vite@">=3.0.0-alpha || >= 3.0.0" from @storybook/builder-vite@0.2.0
9:12:31 PM: npm ERR! node_modules/@storybook/builder-vite
9:12:31 PM: npm ERR! dev @storybook/builder-vite@"^0.2.0" from the root project
9:12:31 PM: npm ERR!
9:12:31 PM: npm ERR! Conflicting peer dependency: vite@3.0.0
9:12:31 PM: npm ERR! node_modules/vite
9:12:31 PM: npm ERR! peer vite@">=3.0.0-alpha || >= 3.0.0" from @storybook/builder-vite@0.2.0
9:12:31 PM: npm ERR! node_modules/@storybook/builder-vite
9:12:31 PM: npm ERR! dev @storybook/builder-vite@"^0.2.0" from the root project
9:12:31 PM: npm ERR!
9:12:31 PM: npm ERR! Fix the upstream dependency conflict, or retry
9:12:31 PM: npm ERR! this command with --force, or --legacy-peer-deps
9:12:31 PM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Link to Minimal Reproducible Example
No response
Participation
- I am willing to submit a pull request for this issue.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
I will pin this to the earlier version until I can figure out what is preventing
vite
and@vitejs/plugin-vue
from upgrading. Thanks.0.2.0 requires vite 3.