Skip to content
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

Task not found #239

Open
joeprivettsmart opened this issue Aug 24, 2022 · 1 comment
Open

Task not found #239

joeprivettsmart opened this issue Aug 24, 2022 · 1 comment

Comments

@joeprivettsmart
Copy link

joeprivettsmart commented Aug 24, 2022

I am running this command in my Mac terminal:

joe.bloggs$ yarn run start

but I get the output:

yarn run v1.22.15
$ npm-run-all -s "yarn start:backend" "yarn start:frontend"
ERROR: Task not found: "yarn"

Clearly I have yarn installed otherwise it wouldn't be able to run yarn run start, so why does npm-run-all not find the yarn command?

@ArtskydJ
Copy link

ArtskydJ commented Jan 10, 2023

npm-run-all is for running npm scripts, not arbitrary shell commands.

You might need to change your package.json file like this:

{
	// ...
	"scripts": {
-		"start": "npm-run-all -s \"yarn start:backend\" \"yarn start:frontend\"",
+		"start": "npm-run-all -s start:backend start:frontend",
		"start:backend": "...",
		"start:frontend": "...",
		// ...
	}
}

If you need to run them using yarn for whatever reason, then npm-run-all isn't the right tool for the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants