Categories
TypeScript Answers

How to fix the ‘tsc command not found’ error when compiling TypeScript?

Spread the love

Sometimes, we want to fix the ‘tsc command not found’ error when compiling TypeScript.

In this article, we’ll look at how to fix the ‘tsc command not found’ error when compiling TypeScript.

How to fix the ‘tsc command not found’ error when compiling TypeScript?

To fix the ‘tsc command not found’ error when compiling TypeScript, we can run tsc without installing it with npx.

To run it, we run

npx tsc app.ts

in our project folder.

npx runs tsc directly from the online package source without installing the package.

Conclusion

To fix the ‘tsc command not found’ error when compiling TypeScript, we can run tsc without installing it with npx.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *