[SalesForce] ERROR running force:source:push: No org configuration found for name

Not sure why this stopped working but all of the sudden sfdx forgot my org configuration.

I pulled down the latest changes from the master branch and went to push them into my checked out branch and this is the error I am getting.

ERROR running force:source:push: No org configuration found for name

As you can see the org is available and connected. What would cause this to disconnect and how am I able to reconnect?

I have tried everything from sfdx force:auth:jwt:grant --clientid... to sfdx force:source:deploy ... to creating a new project. Has this happened to anyone before?

enter image description here

Error UPDATE:

Error: Cannot find module '@oclif/config'
    at Function._load (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:89:24)
    at require (/usr/local/lib/node_modules/sfdx-cli/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (~/.local/share/sfdx/node_modules/@oclif/command/lib/command.js:6:16)
    at Module._compile (/usr/local/lib/node_modules/sfdx-cli/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
    at Function._load (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:89:24)
    at require (/usr/local/lib/node_modules/sfdx-cli/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (~/.local/share/sfdx/node_modules/@oclif/command/lib/index.js:24:19)
    at Module._compile (/usr/local/lib/node_modules/sfdx-cli/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)

But I can see that the files are there:

enter image description here

Best Answer

Ya, this is most likely from the CLI upgrade, and installing the plugin again probably won't help.

It might be because your alias contains .'s in it which I didn't think worked in v6 either. Can you try to update your alias and see if that resolves it?

sfdx force:alias:set newAliasWithoutDots=<yourscratchorg>
sfdx force:config:set defaultusername=newAliasWithoutDots

Update:

Do not plugins:install salesforcedx. This is a common mispractice and should not be done, since the CLI is bundled with salesforcedx already. It just takes up more space on your machine. The only time you would need to manually install salesforcedx is if you need to tie to a specific version or pre-release. i.e.

sfdx plugins:install salesforcedx@pre-release

DO NOT try to install pre-release right now as we are not in pre-release season.

That missing @oclif/config is a known issue when installing salesforcedx in v7 and will be patched.