No. TypeScript 7 does not need to be installed at the root of the drive.
In Visual Studio, TypeScript support is added by installing the TypeScript npm package into the project, and Visual Studio uses the local project version for the language service when it is installed through npm. The documented commands are:
npm install -D typescript@^6.0.0
or, for the TypeScript 7 native preview language service:
npm install -D @typescript/native-preview@beta
The EPERM: operation not permitted, mkdir 'C:\' error indicates npm is trying to create something at C:\, which is a permissions/location problem, not a requirement for TypeScript 7.
Checks to make:
- Run the install from the project root, where
package.jsonis located. - Open
package.jsonin the project root and confirm TypeScript is being added there as a dev dependency. - Check the npm option in the Output window to verify package installation progress and errors if using Visual Studio.
- Check for npm package issues or version problems in the npm Output window.
- If npm cache or environment settings were changed, restart open console windows or reboot so the new values apply.
If the npm cache was redirected, the documented example is to set it to a folder such as D:\packages\npm, not to C:\.