You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many users wouldn't know what ENOENT is. It'd be nice to have a more explicit message saying what went wrong.
Describe the solution you'd like
How about:
Explicitly saying in plain text that the command is missing
If a similar command exists, suggesting it
$ pnpm run buil
ERR_PNPM_NO_SCRIPT Missing script: buil
Command "buil" not found. Did you mean "pnpm run build"?
$ pnpm buil
ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL Command failed with ENOENT: buil
Command "buil" not found. Did you mean "pnpm run build"?
Describe the drawbacks of your solution
...it's less technically precise, I suppose? Feels very pure-positive as a change to me. 🤷
Describe alternatives you've considered
Here's what npm outputs:
$ npm run buil
npm ERR! Missing script: "buil"
npm ERR!
npm ERR! Did you mean this?
npm ERR! npm run build # run the "build" package script
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/josh/.npm/_logs/2023-05-01T19_10_14_940Z-debug-0.log
$ npm buil
Unknown command: "buil"
Did you mean this?
npm run build # run the "build" package script
To see a list of supported npm commands, run:
npm help
...and here's Yarn v1:
$ yarn run buil
yarn run v1.22.19
error Command "buil" not found. Did you mean "build"?
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
$ yarn buil
yarn run v1.22.19
error Command "buil" not found. Did you mean "build"?
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The text was updated successfully, but these errors were encountered:
I am not sure about pnpm buil though. pnpm buil is actually running pnpm exec buil in case there is no script with the name buil. So for this case the error kinda makes sense. Yarn has the same behaviour but they print a better error message, so I guess they parse the error and print it only for specific types of errors.
Describe the user story
When someone runs
pnpm run
with a non-existent command, the current error message is not very informative:Similar with just
pnpm
and the command:Many users wouldn't know what
ENOENT
is. It'd be nice to have a more explicit message saying what went wrong.Describe the solution you'd like
How about:
Describe the drawbacks of your solution
...it's less technically precise, I suppose? Feels very pure-positive as a change to me. 🤷
Describe alternatives you've considered
Here's what npm outputs:
...and here's Yarn v1:
The text was updated successfully, but these errors were encountered: