'Use tsc without npm install -g
I'm working on a project that I have to give to some guys.
The project is in typescript and so they have to run the command tsc to compile.
The problem is when I run this command after doing npm install typescript it seem that the command doesn't exist but if I install with the -g option then it works.
But I really would like the possibility to the futur owner of the project to just have to run npm install without installing dependencies on his computer.
But is it even possible ?
btw I'm on ubuntu 20
Thanks !
Solution 1:[1]
They can run it from the node_modules folder too.
./node_modules/typescript/bin/tsc
Or if you don't like that you could use npx which runs binaries from local node_modules folder.
npx tsc
Solution 2:[2]
If you have your dependencies installed via a package.json and you have yarn installed you can run yarn tsc
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Nick Olszanski |
