go-task / vscode-task

Task for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=task.vscode-task
MIT License
36 stars 4 forks source link

VS Code tasks fail with error "Cannot read properties of undefined (reading 'shell')" #56

Open apgrucza opened 1 year ago

apgrucza commented 1 year ago

When the extension is enabled, tasks defined in .vscode/tasks.json fail to run. For example:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "echo",
            "type": "shell",
            "command": "echo Hello"
        }
    ]
}

When using the Tasks: Run Task command and selecting the echo task, this error pops up:

Cannot read properties of undefined (reading 'shell')
ilkka commented 1 year ago

Broken in the same way for me as well, on Linux, with the latest snap version of vs code.

shalauko commented 9 months ago

Same for me on native Windows 10 and in WSL2 (Ubuntu 22.04). Is there some workaround available?

polamjag commented 8 months ago

Same for me on native macOS (14.2.1 (23C71)) and VS Code 1.85.1 (Universal).

siberianbot commented 3 months ago

Hi! Are there any updates on this?

3uclid3 commented 3 months ago

I'm using 'code workspace' with multiple project in it. (multiple taskfiles)

I have more than 1 default build task. If I'm being ask by vscode to choose, it fails with the error. If I remove the other tasks and don't have to choose, it work fine.

MrVermond commented 3 months ago

Same here. So the extension just breaks the vscode tasks feature and is therefore not usable.

ssbarnea commented 2 months ago

@pd93 Apparently vscode-task extension does break native vscode ability to run tasks (unrelated to taskfile). See them documented at https://code.visualstudio.com/docs/editor/tasks#vscode

When this extension is installed we can see the error described by the OP.