尝试在我的 Gatsby 项目中运行 npm install 时,我不断遇到上游依赖冲突。据我所知,gatsby-source-storyblok 有 gatsby@"^3.0.0 || ^4.0.0" 作为对等依赖,但我不明白为什么它会有那个......以及如何制作它没有那个。
使用 --force 有效,但我不太喜欢这个问题继续存在,并且该项目无法部署到 Netlify 与冲突。
有这方面经验的人能给我指明正确的方向吗?
这是日志:
npm resolution error report
While resolving: [email protected]
Found: [email protected]
node_modules/gatsby
gatsby@"^5.8.1" from the root project
peer gatsby@"^5.0.0-next" from [email protected]
node_modules/babel-plugin-remove-graphql-queries
babel-plugin-remove-graphql-queries@"^5.8.0" from [email protected]
babel-plugin-remove-graphql-queries@"^5.8.0" from [email protected]
node_modules/gatsby-plugin-image
gatsby-plugin-image@"^3.8.0" from the root project
babel-plugin-remove-graphql-queries@"^5.8.0" from [email protected]
node_modules/gatsby-plugin-typescript
gatsby-plugin-typescript@"^5.8.0" from [email protected]
peer gatsby@"^5.0.0-next" from [email protected]
node_modules/gatsby-plugin-image
gatsby-plugin-image@"^3.8.0" from the root project
peer gatsby@"^5.0.0-next" from [email protected]
node_modules/gatsby-plugin-manifest
gatsby-plugin-manifest@"^5.8.0" from the root project
peer gatsby@"^5.0.0-next" from [email protected]
node_modules/gatsby-plugin-page-creator
gatsby-plugin-page-creator@"^5.8.0" from [email protected]
peer gatsby@"^5.0.0-next" from [email protected]
node_modules/gatsby-plugin-sharp
gatsby-plugin-sharp@"^5.8.1" from the root project
peerOptional gatsby-plugin-sharp@"^5.0.0-next" from [email protected]
node_modules/gatsby-plugin-image
gatsby-plugin-image@"^3.8.0" from the root project
peer gatsby-plugin-sharp@"^5.0.0-next" from [email protected]
node_modules/gatsby-transformer-sharp
gatsby-transformer-sharp@"^5.8.0" from the root project
peer gatsby@"^5.0.0-next" from [email protected]
node_modules/gatsby-plugin-typescript
gatsby-plugin-typescript@"^5.8.0" from [email protected]
peer gatsby@"^5.0.0-next" from [email protected]
node_modules/gatsby-plugin-utils
gatsby-plugin-utils@"^4.8.0" from [email protected]
gatsby-plugin-utils@"^4.8.0" from [email protected]
node_modules/gatsby-plugin-image
gatsby-plugin-image@"^3.8.0" from the root project
gatsby-plugin-utils@"^4.8.0" from [email protected]
node_modules/gatsby-plugin-manifest
gatsby-plugin-manifest@"^5.8.0" from the root project
gatsby-plugin-utils@"^4.8.0" from [email protected]
node_modules/gatsby-plugin-page-creator
gatsby-plugin-page-creator@"^5.8.0" from [email protected]
gatsby-plugin-utils@"^4.8.0" from [email protected]
node_modules/gatsby-plugin-sharp
gatsby-plugin-sharp@"^5.8.1" from the root project
peerOptional gatsby-plugin-sharp@"^5.0.0-next" from [email protected]
node_modules/gatsby-plugin-image
gatsby-plugin-image@"^3.8.0" from the root project
peer gatsby-plugin-sharp@"^5.0.0-next" from [email protected]
node_modules/gatsby-transformer-sharp
gatsby-transformer-sharp@"^5.8.0" from the root project
gatsby-plugin-utils@"^4.8.0" from [email protected]
node_modules/gatsby-transformer-sharp
gatsby-transformer-sharp@"^5.8.0" from the root project
peer gatsby@"^5.0.0-next" from [email protected]
node_modules/gatsby-source-filesystem
gatsby-source-filesystem@"^5.8.0" from the root project
peerOptional gatsby-source-filesystem@"^5.0.0-next" from [email protected]
node_modules/gatsby-plugin-image
gatsby-plugin-image@"^3.8.0" from the root project
peer gatsby@"^5.0.0-next" from [email protected]
node_modules/gatsby-transformer-sharp
gatsby-transformer-sharp@"^5.8.0" from the root project
Could not resolve dependency:
peer gatsby@"^3.0.0 || ^4.0.0" from [email protected]
node_modules/gatsby-source-storyblok
gatsby-source-storyblok@"^5.0.15" from the root project
Conflicting peer dependency: [email protected]
node_modules/gatsby
peer gatsby@"^3.0.0 || ^4.0.0" from [email protected]
node_modules/gatsby-source-storyblok
gatsby-source-storyblok@"^5.0.15" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
我正在尝试成功运行 npm install 而无需使用 --force 或没有冲突