tsc is simply not being acknowledged as a valid command, neither internally nor externally

Setting up TypeScript on my computer has been a challenge. Despite trying various solutions I found online, nothing seems to be working for me.

Here is a summary of what I have attempted:

1) I downloaded TypeScript for VS2015 from the Microsoft website and installed it. This resulted in the creation of two folders on my system:

  • C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7
  • C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8

2) Next, I launched my ASP.NET 5 project in Visual Studio 2015 and tried running the command tsc --version within the VS Command Prompt. Unfortunately, this triggered an error message.

3) In an attempt to resolve the issue, I executed the command npm install -g typescript from the VS Command prompt within my project directory. However, the error persisted.

4) I also modified my system variables by adding

C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\
to the Path variables. Despite this adjustment, the error message remained unchanged.

I have exhausted all resources available online but haven't been successful in resolving this matter. Any assistance would be greatly appreciated.

P.S. After each step, I restarted my explorer.exe to ensure that all variables were properly reloaded.

Answer №1

Finally, a tried and true shut down and restart fixed the issue.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Experiencing difficulties while attempting to install nodejs 12 on CentOS due to an error

I am currently in the process of installing Node.js on my CentOS 6 machine with version: centos-release-6-10.el6.centos.12.3.x86_64 Below is the command I am running: curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash - sudo yum install nodejs Ho ...

Is it possible for the versions in the package.json file to be altered

I've made updates to my package.json file - all packages are listed as follows: "dependencies": { "@apollo/client": "3.6.4", "bootstrap": "4.6.2", "graphql": "16.5.0" } ...

Creating a websocket handler template for universal use

Currently, I am exploring different approaches to handling a generic websocket handler. The current implementation of the handler I have looks something similar to this: type WSMessage = { type: string; [key: string]: unknown; } type HandlerFunc = ...

Using React TypeScript to create interactive maps with Highcharts

I'm currently attempting to implement the WorldMap example using TypeScript in Highcharts, but I am encountering difficulties with the series within the Highcharts Options: (Highcharts, Highstock, Highmaps, Gantt) Series options for specific data and ...

Altering the properties of a specified element within TestBed using the overrideComponent method

We are implementing TestBed.overrideComponent() to substitute a component with custom behavior. TestBed.overrideComponent(CoolComponent, { set: { template: '<div id="fake-component">i am the fake component</div>', sel ...

Prohibit the use of explicit type parameters or limit the union type parameters to enhance the safety of the types

When the getValues() function is called without explicit type parameters, the Typescript code functions correctly. However, calling it with explicit type parameters can result in errors (as seen in invocation getValues<'a' | 'b' | &a ...

Troubleshooting the ineffectiveness of Relative paths, baseUrl, and paths in Ionic2 with Angular2

I've been doing some research on similar forums but I haven't been able to find a solution yet. There must be a small step that I am overlooking. My objective is to achieve: import { Logger } from 'logging' instead of import { Logg ...

The reason behind the ghost problem - classRef isn't recognized as a constructor

Recently, I encountered an issue where the app was not loading in the browser while running an Angular NX project locally with the command "start-dev": "nx run-many --target=serve --all". The screen would get stuck on our loading animat ...

Encountering an NPM Authorization Issue When Accessing Private Repo During Jenkins Build

Currently, I am developing a Front End Application that relies on an internal dependency hosted in a separate repository. This dependency is located in our private Bitbucket repository and managed using NPM through the git+https://<the-dependency-repo&g ...

Exploring the Concepts of Union and Intersection Types in Typescript

I am trying to wrap my head around Union and Intersection types in TypeScript, and I've come across a case that's puzzling me. You can check it out on this Playground Link interface A { a: number; } interface B{ b: boolean; } type Un ...

Is there any unique significance to a npm run-script named "install"?

I've created a package.json file that includes the following: "dependencies": { "d3": "~3.5.5", "forever": "^0.14.1" }, "scripts": { "install": "make -f install.makefile", "data": "make -f data.makefile core", "serve": "node ./node_mo ...

There are no properties associated with this particular data type

As someone who is new to TypeScript, I am encountering two issues with data types. This snippet shows my code: const say: object = { name: "say", aliases: [""], description: "", usage: "", run: (client: ob ...

The process of installing dependencies recursively using pnpm

In my monorepo project, I have workspaces A and B. Workspace A depends on B being built first, with each workspace in its own folder as defined in pnpm-workspace.yaml packages: - 'src/mydepa' - 'src/mydepb' { "name": &qu ...

I am experiencing difficulties in installing JavaScript libraries

PS D:\React> npm i -g expo-cli npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2d48555d42004e41446d68c7b6d717268805a6369786964 ...

What is the recommended return type in Typescript for a component that returns a Material-UI TableContainer?

My component is generating a Material-UI Table wrapped inside a TableContainer const DataReleaseChart = (): React.FC<?> => { return ( <TableContainer sx={{ display: 'grid', rowGap: 7, }} > ...

elimination of nonexistent object

How can I prevent releasing data if two attributes are empty? const fork = [ { from: 'client', msg: null, for: null }, { from: 'client', msg: '2222222222222', for: null }, { from: 'server', msg: 'wqqqqqqqq ...

Resolving Vue and TypeScript Typing Issues

Here's an example of a component: <script setup type="ts"> interface Props { items: string[] } const props = defineProps<Props>(); </script> <template> <ul> <li v-for="item in props.i ...

Using React Router's useHistory hook, you can change the URL without triggering a component reload

I am looking to create a simple button that, when clicked, redirects a user to a specific route that I have defined in my Index.tsx file. After clicking the button, the URL bar correctly changes to "/dashboard", but the component (just an h1) does not app ...

What is the best approach to accessing and reading a JSON file within an Angular 12 application?

I've been attempting to retrieve data from a local JSON file that holds configuration information for my application. Every time I run the ng build command in the Angular CLI, I encounter an error. The TypeScript document related to my component: my- ...

What could be causing the presence of a "strike" in my typescript code?

While transitioning my code from JavaScript to TypeScript for the first time, I noticed that some code has been struck out. Can someone explain why this is happening and what it signifies? How should I address this issue? Here's a screenshot as an exa ...