Closed azat-io closed 2 years ago
You have to provide a file to tsm
, so it'd need to be something like tsm node_modules/uvu/bin.js ...
If i run just yarn tsm
I'll get the same error
Because you need a file path...?
Try yarn tsm file.ts
The same error
I have created repository where you can check the problem: https://github.com/azat-io/yarn-berry-tsm-example
cc @arcanis
Any ideas how to run uvu tests with Yarn Berry and TypeScript?
It should be like any other environment. If it's not, then it's entirely Yarn@2 related
@lukeed I have a very similar problem like @azat-io described.
running yarn tsm ./src/myfile.ts
results into
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/User/github/myproject/.yarn/cache/tsm-npm-2.2.1-7322a65949-7fcbe7d4c9.zip/node_modules/tsm/loader.mjs' imported from /User/github/myproject/app/
Did you mean to import /User/github/myproject/.yarn/cache/tsm-npm-2.2.1-7322a65949-7fcbe7d4c9.zip/node_modules/tsm/loader.mjs?
I tried to use the tsm package with command
yarn tsm uvu tests
and got the following error: