Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Getting into a yarn dev 'category'?

A Yarn Getting Started Recipe tells me how to install Typescript using yarn:

yarn add --dev typescript

But when I then type, for example, tcs app.ts for typescript to compile my app.ts file I get the error

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

zsh: command not found: tcs

How do I get into the dev ‘category’, which I specified in yarn add (docs)?

>Solution :

The command is actually tsc. If typescript is installed locally, you run it by yarn tsc.

‘dev’ is not a ‘category’, it’s a kind of dependency: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#devdependencies – only used when developing, in opposite to production where you may use yarn install --production because there’s no need for typescript anymore. Only packages from https://docs.npmjs.com/cli/v8/configuring-npm/package-json#dependencies are installed then.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading