TypeScript error TS1005: ‘;’ expected [How to Solve]

TypeScript error TS1005: ‘;’ expected

If you are using a lower version (1.0.3.0). TSC — version, your version should be set to 2.5.2

In Linux, OSX, check the location of your installation directory, use: which TSC and remove it

Try uninstalling the “global” typescript:
Installing as part of a local dev dependency of your project

npm install typescript --save-dev

Execute it from the root of your project

./node_modules/.bin/tsc

windows :

Remove C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0 directory. Now

install the latest version

npm install -g typescript 

!!!! Try again

Similar Posts: