I've got recently stuck with a sudden problem I don't understand. Context: I do have a monorepo with a bunch of TS projects developed via VS Code. Using pnpm as the package manager. I've tried to set up the default build task in such a way that clicking Shift+Ctrl+B means "build the current project":
{
"tasks": [
{
"label": "build",
"command": "pnpm",
"args": ["run", "build"],
"options": {"cwd": "${fileDirname}/../"},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
This used to work fine until I've upgraded the pnpm to 10.4.0. This is the first time I've tried to do pnpm self-upgrade; it did complain with EPERM, and I've applied the solution found on stackoverflow. Now the status is as follows:
- running
pnpm -vanywhere in command prompt works perfectly - running
pnpm run buildfrom the VS Code pwsh terminal works perfectly (as long as I run it at the correct path, i.e. one level below the project's package.json) - running it via Shift-Ctrl-B fails with the following diagnostics:
* Executing task: C:\Users\<username>\AppData\Local\pnpm\pnpm run build
* The terminal process failed to launch: A native exception occurred during launch (Cannot create process, error code: 193).
How do I fix this? Also: maybe there is a better way of implementing a robust "build the current sub-project" command?