mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -04:00
fix(core): don't fail on skipped optional deps, when calculating depsRequiringBuild (#8404)
This commit is contained in:
5
.changeset/brave-pants-drive.md
Normal file
5
.changeset/brave-pants-drive.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/core": patch
|
||||
---
|
||||
|
||||
Don't fail on skipped optional dependencies, when searching for dependencies that should be built.
|
||||
@@ -1420,7 +1420,7 @@ const _installInContext: InstallFunction = async (projects, ctx, opts) => {
|
||||
const depsRequiringBuild: DepPath[] = []
|
||||
if (opts.returnListOfDepsRequiringBuild) {
|
||||
await Promise.all(Object.entries(dependenciesGraph).map(async ([depPath, node]) => {
|
||||
if (node == null) return // We cannot detect if a skipped optional dependency requires build
|
||||
if (node?.fetching == null) return // We cannot detect if a skipped optional dependency requires build
|
||||
const { files } = await node.fetching()
|
||||
if (files.requiresBuild) {
|
||||
depsRequiringBuild.push(depPath as DepPath)
|
||||
|
||||
Reference in New Issue
Block a user