Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such file or directory for non-hoisted dependencies #82

Closed
tsnobip opened this issue Jan 10, 2024 · 8 comments
Closed

No such file or directory for non-hoisted dependencies #82

tsnobip opened this issue Jan 10, 2024 · 8 comments

Comments

@tsnobip
Copy link

tsnobip commented Jan 10, 2024

I'm using a yarn v4.0 monorepo setup and I can't build using rewatch because non-hoisted dependencies cause the following error:

[1/7] 🌴  Building package tree...[1/2] ️🛑   Error building package tree (are node_modules up-to-date?)... 
 More details: No such file or directory (os error 2)%     

I have such a file tree:

monorepo
├── node_modules
└── packages
     └── packageA
           └──node_modules
               └── @rescript/react

dependencies in rescript.json/bsconfig.json that are in the top level node_modules don't cause issues, only the ones inside the package node_modules, like @rescript/react in this case.

Could be related to #74.

@jfrolich
Copy link
Collaborator

Yes we should address this, shouldn't be hard

@DZakh
Copy link
Contributor

DZakh commented Jan 12, 2024

Do you have ideas on how to differentiate between monorepos with hoisted and non-hoisted dependencies? Or should we should check both places? It's an IO though, but probably not critical.

@DZakh
Copy link
Contributor

DZakh commented Jan 12, 2024

Something like this: #84

@tsnobip
Copy link
Author

tsnobip commented Jan 12, 2024

yes we should first look for non-hoisted deps and then for the hoisted ones.

@DZakh
Copy link
Contributor

DZakh commented Jan 12, 2024

Yeah. Makes sense to me. I'll try to finish the pr during the weekend

@tsnobip
Copy link
Author

tsnobip commented Jan 12, 2024

Let me know when it's done, I'll test it on my setup

@DZakh
Copy link
Contributor

DZakh commented Mar 16, 2024

Should be fixed in the PR #91

@jfrolich
Copy link
Collaborator

This should be fixed 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants