Home > Software engineering >  "ERR_PNPM_NO_SCRIPT Missing script: tsc" when I run the command "pnpm run tsc"
"ERR_PNPM_NO_SCRIPT Missing script: tsc" when I run the command "pnpm run tsc"

Time:08-29

I'm trying to run pnpm run tsc and I get the following error

ERR_PNPM_NO_SCRIPT  Missing script: tsc

How can I solve the issue? Thank you in advance

CodePudding user response:

pnpm is complaining that package.json doesn't have a script named tsc in the scripts section.

Try executing it like ./node_modules/.bin/tsc instead or create an entry in the scripts section of package.json like the following snippet:

{
  "scripts": {
    "tsc": "tsc",
    ...
  }
}
  • Related