pzavolinsky / ts-unused-exports

ts-unused-exports finds unused exported symbols in your Typescript project
MIT License
738 stars 46 forks source link

Cannot find module 'typescript' #291

Closed SharkBaby closed 1 year ago

SharkBaby commented 1 year ago

node: v14.20.0 when I run below command, I got below error which say Cannot find module 'typescript' npx ts-unused-exports tsconfig.json

image
mrseanryan commented 1 year ago

hi @SharkBaby can you check that TypeScript is installed?

In the README there is an explanation:

| As of version 7.0.0 the TypeScript compiler is a peer dependency of ts-unused-exports. This means that if the TypeScript compiler is not already in the same spot as ts-unused-exports, you have to install it yourself (e.g. with npm i -D typescript).

thank you