-
Notifications
You must be signed in to change notification settings - Fork 28
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
yarn bundle
throwing error ENOENT: no such file or directory
#188
Comments
Hey @rhlsthrm, That error usually occurs because either the package Looking at the I added the following to
And then it bundled. If you're still experiencing issues with it, please re-open this issue. |
@ojkelly but those packages are not supposed to be part of the My assumption is that the point of this is only to use the workspace packages where this is a dependency. |
@rhlsthrm fair enough, something else must be at play then. I just checked Bundling works after switching to Let's re-open to see if we can find the cause in this case. |
We have not tried pnp yet. I'm worried about breaking some other downstream workflow using pnp but I will try it and see if everything else works. |
Hey @ojkelly, I've encountered this same issue with trying to bundle a package that exists within a monorepo with I've tried excluding the React Native project via Error output:
Does |
Nothing prevents copying all the files at the moment, as we're using an os file copy to setup the tmp dir.
It sounds like you might be onto the right solution. If you're interested in making a PR the relevant area is here https://github.com/ojkelly/yarn.build/blob/main/packages/plugins/plugin-bundle/src/commands/bundle/index.ts#L355 Otherwise I think I can get to solving this in the next few weeks. I think an ideal approach is to take the |
Hi :) |
Unfortunately, I came across the same issue ... I tried multiple recipes ...also as you already mentioned the |
I think what we probably need to do here to get this unblocked is add error handling around that area to catch, and probably ignore the errors thrown. The proper fix sounds like ensuring we check if a file/folder exists before deleting it. then again, if we try to delete and get |
My only concern, again it's your code, that if you do that it might break (or not) the integrity of the operation: why is it attempting to delete something that doesn't exist, in my case I think it was a symbolic link pointing to my workspace packages. |
Yep fair. In this case the only point of that function This error appeared around this code in the past #120 which fixed #119.
It's preferable for the bundle to be marginally bigger, than break in some circumstances.
I think #142 is likely related to this, because it appears we've followed a path, and tried to delete something that does not exist. If you're able to provide a link to a repro I think I know where we need to look now. Otherwise, if you have a bit of time, I'd drop some And see what it's getting tripped up on. Again, that functions job is just to reduce the bundle size. Also see there's two uses of
Can you expand on this? is it just like the We run yarn install before reducing the bundle size to let yarn itself remove any unused dependencies (of which there may be some, as we have removed your other local packages that are needed). I feel like we're finally getting closer to resolving this bug. |
Was any progress ever made on this? I’m running into the same issue. |
This also happens if you have python code in your project. In our case, it's a top-level "jobs" folder which is not connected at all to yarn/node/js, but gets copied just by being in the same repo.
( I was really surprised that |
Describe the bug
I have a yarn workspace, I am trying to use this plugin to bundle and create docker images. When I try to bundle a package to be dockerized, I get an error:
To Reproduce
Steps to reproduce the behavior:
amarok
: https://github.com/connext/nxtp/tree/amarokyarn bundle
inpackages/agents/sequencer
Expected behavior
Bundle happens.
Screenshots
Desktop (please complete the following information):
Additional context
Yarn version:
3.2.0
The text was updated successfully, but these errors were encountered: