lando2319
lando2319

Reputation: 1810

npm run test task in VSCode suddenly injecting with yarn

I run my backend tests with npm run test:backend from the root of my project, suddenly as of today the task command is injecting yarn into the command

 Executing task: yarn run test:backend 

/bin/bash: yarn: command not found

When I run npm run test:backend from the integrated terminal everything runs fine, but the "Run Task" has suddenly started requiring yarn.

This must have been some autoupdate by VSCode.

How can I get back to running my tasks with npm run

my tasks.json has this

        {
            "type": "npm",
            "script": "test:backend",
            "problemMatcher": [],
            "label": "npm test:backend",
            "detail": "backend tests",
            "group": "build"
        },

Upvotes: 0

Views: 591

Answers (1)

lando2319
lando2319

Reputation: 1810

I went to VSCode settings and searched "Use Yarn" and I set the package manager as npm

VSCode Setting ID: npm.packageManager

Upvotes: 2

Related Questions