I’m trying to install Typescript on a Windows11 PC.
My node version is 21.5.0
My npm version is 10.5.2
I didn’t want to install it globally to test first and learn more about using it.
So, I created a new directory in my default user folder, naming it typescript.
I changed directory to the typescript folder.
There, I typed the command npm install typescript –save-dev.
It seemed to install, pretty quickly returning, “up to date, audited 92 packages in 907ms”
But the folder “typescript” is empty.
I typed tsc -h, and got command not found
Same for tsc -v
I did a search and found a typescript folder inside the node_modules folder in the default user’s folder. Inside that folder there are a bin and a lib folder, a license.txt, package.json, readme.md, security.md, and ThirdPartyNoticeText.txt file, so it kind of appears to me that it was installed, but I don’t know if it was done by some prior lesson project without my awareness.
Have I totally messed things up? Was a prior global installation done? Why can’t I get any response from tsc -h? or tsc -v?
I don’t see anything in the system path that points to either the node_modules folder or to a typescript folder.
The closest thing I see to anything that may be relevant in the user variables path is one with the drive and path to usersTestAppDataRoamingnpm and another line without a drive letter that just reads node_modulesnpm.
Help?