0

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 -v anywhere in command prompt works perfectly
  • running pnpm run build from 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?

1 Answer 1

0

Fooling around with the contents of my AppData/Local/pnpm folder I've found a possible fix: renaming the file 'pnpm' (with no extension) has helped. I am not sure this is a proper fix though since it might have broken something else.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.