-
Notifications
You must be signed in to change notification settings - Fork 78
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
sfdx: No such file or directory #2447
Comments
Is this on your radar @cromwellryan? This is the second bug I'm aware of where sfdx deletes itself. Once is really surprising, twice is worrying! Will there be changes in |
I am facing similar issue without doing any manual update this is happening with both sfdx and sf command |
@rchoubey1 yes, the issue will continue to happen unless you take some action. The CLI autoupdates itself (workaround 6 turns this off). |
This feature impacted a number of our devs before we realized what was happening. I would argue another Re: workaround 6, should the value be Finally, just wanted to ask if CLI plugins can be sourced from a salesforce.com domain? It's one thing to justify opening the firewall for an approved vendor domain but quite another for an open source domain. To update our Jenkins server to |
yes, good catch, fixed, thanks! |
What's the domain that's causing problems? npm/yarn? |
See also #718 |
So, now that the damage is done, is there a CLI removal tool to get rid of all the remnants left behind? I will go ahead and install SF, but want to clean up what's left behind before doing so. |
I can help with this one as I provide this link pretty frequently to my own product's users: Make sure that you remove the additional directories documented there for the respective platforms to ensure you have a full uninstall. You do not need to remove the contents of |
Thank you Scott! |
This feature impacted a number of our devs before we realized what was happening. I would argue another Re: workaround 6, should the value be Finally, just wanted to ask if CLI plugins can be sourced from a salesforce.com domain? It's one thing to justify opening the firewall for an approved vendor domain but quite another for an open source domain. To update our Jenkins server to
npm, so I guess https://registry.npmjs.org? In fact, even from my work computer I have to switch to the non-secure URL (i.e. http vs. https). Otherwise we get a certificate error. |
CLI plugins are npm packages (always have been), both Salesforce's packages and 3rd-party packages. That is unlikely to change. Typically, when companies want more control of npm packages than "all of npm" they use something like Artifactory (think private npm registry) that proxies some subset of preferred/approved packages. |
This feature impacted a number of our devs before we realized what was happening. I would argue another Re: workaround 6, should the value be Finally, just wanted to ask if CLI plugins can be sourced from a salesforce.com domain? It's one thing to justify opening the firewall for an approved vendor domain but quite another for an open source domain. To update our Jenkins server to
npm, so I guess https://registry.npmjs.org? In fact, even from my work computer I have to switch to the non-secure URL (i.e. http vs. https). Otherwise we get a certificate error.
Well if you had originally installed using the Windows installer updates worked fine. But in recent years the ability to install has been removed so we had to switch to using npm (npm is an approved tool that can be installed automatically). However, as previously noted, we can only install/update with npm through the non-secure URL. There must be something different between running |
Got the issue with sf today. It worked until before lunchtime, when I got back any sf command fails: I'm not using sfdx. I'm now deleting any trace of sf-related software and I will re-install it from scratch, setting the env SFDX_DISABLE_AUTOUPDATE=true. |
@azanatta whoa. Thanks for letting us know. |
@azanatta |
@azanatta that's v1 of #2132 |
Using plugins in VSC, this happened to me too: /Users/gkibilov/.local/share/sfdx/client/bin/sfdx: line 16: /Users/gkibilov/.local/share/sfdx/client/bin/../7.209.6-8ba3197/bin/sfdx: No such file or directory Question: Details: gkibilov@Georges-MacBook-Pro xyz-dev % sf plugins --core |
|
No, it only affects sfdx and sf v1 (if you got sf v1 bundled with sfdx) |
Thanks @mshanemc ! I did manage to install 7.158.1 (my employer provides it by default) but the issue remains. I have made no upgrades to JDK either but the VSC extensions did update a week back. I will seek out help on the given site |
@mshanemc what does the vscode extension use? if it uses sfdx and sfdx uninstalls itself, how can we use the vscode extensions for salesforce? |
Just noticed that sfdx is aliased to sf so maybe that answers my question... |
VSCode makes calls to "sfdx" and that works with either CLI. |
What if we don't have sudo access? Is there another way to migrate? |
@ssk42 sudo is not required. And discouraged for npm installs. |
@mshanemc - Meant sudo for the uninstall! Sorry, should have clarified as seen in https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_uninstall.htm because npm uninstall seemingly didn't do anything |
you can try it without sudo. If your install was done correctly you should be the owner of those folders/files. Hopefully? |
Nope, no dice. Permission denied on a bunch (most?) of the files |
Resolved by just going to /usr/local/bin/ and trashing sfdx and sf. Thanks! |
I had the same problem, just deleted the sfdx folder which was in the error message and everything works as normal. |
This will resolve this issue on my macOS rm -rf ~/.local/share/sfdx ~/.config/sfdx ~/.cache/sfdx |
For me this issue continues even after using the latest sf cli and disabling updates for sfdx. Anyone else noticing the same behavior? |
@mshanemc My time had come this afternoon. This is what happens: What would you recommend? Thx |
@ragoergens I'd recommend option 1 🤪...almost half of daily executions are on sf. What's holding you back? That's the last one before all the node support stuff started changing, and the in-progress ESM updates. https://www.npmjs.com/package/@oclif/plugin-update?activeTab=versions |
If you're installing sf v2 from sfdx I would follow the documented steps here: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_move_to_sf_v2.htm Also, to ensure a complete uninstall before installing sf v2 follow these steps: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_uninstall.htm |
For some reason I was on sf v2 but had never removed C:\Program Files\sfdx, which was first in my PATH 🙈 @mshanemc @SCWells72 for Illuminated Cloud, it's just a matter of configuring the proper executable 😁 |
Facing the same issue. Do we have any workaround for it? When can we expect this to be resolved?? |
@Mahakb, the solution is to do a 100% clean uninstall of what you hav installed now and install the latest v2 CLI build. See links above for both. |
Thanks this worked. |
I'm going to close/unpin this issue. Seems to have quieted down now that most of you are on sf. |
What's the error?
Why's it doing that?
oclif's update code cleans up old versions of the CLI after 6 weeks.
sfdx
hasn't been published...in about 6 weeks. So sfdx is trying to delete itself.We've never not published a CLI for 6 weeks, so we didn't know the code was wrong.
OK, what can I do as a workaround?
Well, the good news: there are a lot of workaround options!
sfdx
anymore. Use sf sf (v2) is Generally Available #2132sfdx plugins:install @oclif/[email protected]
will replace the plugin that has the bug. You can run this before the CLI deletes itself to prevent the problem. If the problem already happened, you need on one of the other options.mtime
(the last modified date) of the directory. So you could do something liketouch .local/share/sf/client/7.209.6-[whatever that SHA was]
. Someone who knows windows can hopefully post the equivalent.sfdx
, since we don't plan any updates for sfdx, you could try turning off the auto-update code by settingSF_DISABLE_AUTOUPDATE=true
in your env to keep the bad code from ever running.The text was updated successfully, but these errors were encountered: