I had installed TypeScript through npm a while back Initially, it was working fine but turned out to be outdated Trying to upgrade it with npm ended up breaking everything.
Is there any way to do a fresh installation?
Here are the steps I took:
Philip Smolen@DESKTOP-UOBK4AV MINGW64 ~
$ npm uninstall typescript
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\Philip Smolen\package.json'
...
removed 1 package in 0.39s
found 0 vulnerabilities
Philip Smolen@DESKTOP-UOBK4AV MINGW64 ~
$ npm install typescript
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\Philip Smolen\package.json'
...
+ <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="aaded3dacfd9c9d8c3dadeea9e84988499">[email protected]</a>
added 1 package from 1 contributor and audited 1 package in 0.975s
found 0 vulnerabilities
...
Philip Smolen@DESKTOP-UOBK4AV MINGW64 ~
$ tsc --version
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'C:\Users\Philip Smolen\AppData\Roaming\npm\node_modules\typescript\bin\tsc'
...
This is my first time using npm and I'm unable to locate any troubleshooting documentation.