diff --git a/.changeset/mean-dodos-smoke.md b/.changeset/mean-dodos-smoke.md new file mode 100644 index 0000000..4b77b50 --- /dev/null +++ b/.changeset/mean-dodos-smoke.md @@ -0,0 +1,5 @@ +--- +"app-builder-bin": patch +--- + +fix: find the real parent node module diff --git a/pkg/node-modules/nodeModuleCollector.go b/pkg/node-modules/nodeModuleCollector.go index 81bc1be..7cf7a1e 100644 --- a/pkg/node-modules/nodeModuleCollector.go +++ b/pkg/node-modules/nodeModuleCollector.go @@ -228,6 +228,11 @@ func (t *Collector) resolveDependency(parentNodeModuleDir string, name string) ( } dependencyDir := filepath.Join(realParentNodeModuleDir, name) + info, err := os.Stat(dependencyDir) + if err == nil && !info.IsDir() { + return nil, nil + } + dependency, err := readPackageJson(dependencyDir) if err != nil { if os.IsNotExist(err) {