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
ERROR running force:source:retrieve: Cannot read property 'getInstance' of undefined #564
Comments
I am also seeing this error. I've been pulling my hair out trying to resolve. I've reinstalled the CLI components several times and have started with a clean .sfdx directory. Currently am completely blocked on development. My scenario:
The log files show:
I do not have a The only file in .sfdx is I do have a sfdx-project.json file in my current project directory. It has the correct packageDirectories content. Additional informationVS Code Version: 1.47.3 SFDX CLI Version: sfdx-cli/7.69.0-c7be45ae22 OS and version: Windows 10, version 1909 |
Facing same issue while pushing any lwc component to org. |
@chriswill @dhaniksahni @quygiengtmobile I'm wondering if this is a new issue or a previously existing one, have you tried downgrading to a previous CLI version ? |
This is due to having unnecessary plugins installed. We still aren't sure why the node_module resolution is getting messed up because the You should be able to do See #555 for more details. Notice in the thread you should not reinstall those plugins unless targeting old plugin versions. |
Thank you! I've been searching for a solution for this for several days now. Just some background to assist others: I'm not sure what triggered the @amphro Are you saying there is no need to reinstall the salesforcedx plugin? Are they part of the sfdx core package now? |
Hi All, |
I fixed this issue by following steps in #555
|
Make sure your .sfdx folder has a sfdx-config.json file. If it is present try removing it and adding it again and authorize an org. the file should contain a json structure as follows: I tried the same and it redirected me to salesforce log in page and now the error does not come anymore. |
| @amphro Are you saying there is no need to reinstall the salesforcedx plugin? Are they part of the sfdx core package now? Correct. They have been bundled with the CLI since the beginning. You only need to install it if you want to hardcode to a specific version. Closing this. |
Summary
received Error:
ERROR running force:source:retrieve: Cannot read property 'getInstance' of undefined
on all sfdx cmd: example: sfdx force:source:retrieve
Steps To Reproduce:
and received an error.
Expected result
expected no error
Actual result
ERROR running force:source:retrieve: Cannot read property 'getInstance' of undefined
Additional information
Feel free to attach a screenshot.
VS Code Version: 1.47.3
SFDX CLI Version: 49.4.0
OS and version: MacOS 10.15.6
The text was updated successfully, but these errors were encountered: