Skip to content

Commit

Permalink
fix: find the real parent node module (#132)
Browse files Browse the repository at this point in the history
* fix: find the real parent node module
---------

Co-authored-by: payne.fu <[email protected]>
Co-authored-by: beyondkmp <[email protected]>
  • Loading branch information
3 people authored Sep 11, 2024
1 parent 82eeb34 commit 1092684
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/mean-dodos-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-bin": patch
---

fix: find the real parent node module
5 changes: 5 additions & 0 deletions pkg/node-modules/nodeModuleCollector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1092684

Please sign in to comment.