Recent changes to the CLI version 7.74.1 has introduced a SFDX project directory requirement as a prerun hook. This is causing our CICD / plugin to fail whereever it is calling the CLI from outside a SFDX project directory, for commands that you wouldn't expect to be dependent on a project directory:
e.g.
Run command from outside SFDX project directory.
Command to execute successfully from any working directory - not necessarily a SFDX project directory.
Commands that you would not expect to be tied to a SFDX project directory are failing to execute from a non-project directories.
(node:17540) [InvalidProjectWorkspace Plugin: sfdx-cli] InvalidProjectWorkspace Plugin: sfdx-cli: This directory does not contain a valid Salesforce DX project
module: @oclif/[email protected]
task: runHook prerun
plugin: sfdx-cli
SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
CLI Version 7.74.1
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)

@amphro Our pipelines started breaking, mainly on the release orchestration side of things, where we don't checkout the repository, (install an unlocked package or do some org operations, there is no need for a sfdx project here)
I confirm, it started breaking for anyone upgrading/freshinstalling since this night (morning).
It was working yesterday with same sfdx-cli package version...
an sfdx project folder (sfdx json definition file) is NOW mandatory for everything, EVEN for creating a SFDX projet
2 workarouds
@KevinGossentCap its due to the update in @salesforce/core to 2.12.0, released earlier in the day
@azlam-abdulsalam do we have any way to force downgrade the module ?
I don't think there is an easy way, as its a depenedency of salesforce-alm and many plugins
Thanks for your insite @azlam-abdulsalam .
On our side we booked a high priority Case to Salesforce as lots of processes in the CI chain and in our dev work are breaking because of this issue.
Hoping to see a resolution ASAP.
As a workaround I ended up performing a "touch sfdx-project.json" after installing SFDX CLI from NPM in our CI/CD scripts. Even though it's a empty file it lets the CLI recognize a project file is there and execute commands.
Its fixed for now, as the latest tag on core is at 2.11.0
Most helpful comment
Its fixed for now, as the latest tag on core is at 2.11.0