question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uvu CLI not available: "uvu: not found"

See original GitHub issue

I can succesfully run isolated tests vía the node -r tsm tests/MyTest.ts command. Yet whenever I try to run uvu -r tsm tests or any command that starts with uvu, I get the following error:

uvu: not found

I have uvu 0.5.5 installed: image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Lucasmiguelmaccommented, Jan 4, 2022

Ok, didn’t got that part. Thank you very much!

1reaction
lukeedcommented, Jan 4, 2022

No, this is how npm works. If I understand your additional comments correctly – and pairing it with your lack of "test" script in your package.json – you were trying to run uvu -r tsm ... directly in your command line, which is asking for a global uvu executable For that, you do have to have uvu (or any) installed globally.

Had you had this in your package.json:

// package.json
{
  "scripts": {
    // ...
    "test": "uvu -r tsm tests"
  }
}

And then run npm test, it would have worked because npm is invoked & told to run uvu ... which looks at the project’s own dependencies for the uvu binary (and a tsm package). This is true for yarn and everything else.

Read more comments on GitHub >

github_iconTop Results From Across the Web

uvu/cli.md at master · lukeed/uvu - GitHub
The uvu CLI is available whenever you install the uvu package. The role of the uvu CLI is to collect and execute your...
Read more >
`uvu` is not browser compatible · Issue #37 · lukeed/uvu - GitHub
My remaining goal with the CLI is to allow you to rerun the same test files with different source modules. I have a...
Read more >
uvu/watch.md at master · lukeed/uvu - GitHub
Watching – aka "re-running" – tests is not implemented by the CLI directly. This partly because uvu is so fast and lightweight, which...
Read more >
How to use uvu: A fast and lightweight test runner
This post will cover the usage of uvu, how it compares to Jest and AVA, and why and when to use it for...
Read more >
Constitutional Literacy Institute - Utah Valley University
CLI is a tool for teachers to do just that. Instruction is provided by esteemed constitutional scholars from the Center for Constitutional Studies...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found