-
Notifications
You must be signed in to change notification settings - Fork 127
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
Cannot refer to node_modules in monorepo #411
Comments
There seem to be two issues here:
|
ok so i tested it and with your setup it does in fact fail. if you move the contents of contracts one level up and add the deps to that higher level package.json it should work. The other option could be to install deps with forge install vs yarn |
Hello @wshino. We merged recently a fix to be able to pass the allow_paths correctly to ZkSync context so the issue should be resolved. I tested the functionality with your repo and we created a test for this special case. Feel free to try it out and reach out to us if anything else comes up. |
@Jrigada Thank you so much! I've just tested the behavior on foundry-zksync-example. But |
Is the error you are getting still the same as before? In particular
|
Yes, somehow it's still happening. I'll send you more details if you want. |
Yes no problem. I am not able to reproduce it even though I reset my environment. Do you have any other change in your repo? With the latest commit on main of foundry zksync it should work. |
I was able to recreate the issue and figure out a workaround. Essentially you'll need to create a symlink within
and
then compilation should work |
@koloz193 Thank you so much. Actually we are using the workaround that you posted. |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.0.2 (d94bab2 2024-06-04T00:25:36.901896000Z)
What command(s) is the bug in?
forge build --zksync
Operating System
macOS (Apple Silicon)
Describe the bug
It seems that current foundy-zksync cannot resolve some files in monorepo's node_modules dir in
forge build --zksync
.I have foundry.toml properly configured with lib and fs_permissions. I did not encounter this error before; adding allow_paths did not help. Perhaps these settings are not crossing over to foundy-zksync properly? Is there a way to resolve this?
The build succeeds properly in
forge build
command (normal foundry).I created an example repo created by
forge init
If you do
forge build --zksync
in the contracts dir here, you should be able to reproduce the above problem.https://github.com/wshino/foundry-zksync-example
Thank you.
The text was updated successfully, but these errors were encountered: