Error Encountered: Visual Studio cannot locate the file 'COMPUTE_PATHS_ONLY.ts' during the build process

Upon fixing my visual studio 2015, an error was thrown that I haven't encountered before.

Error       Build: File 'COMPUTE_PATHS_ONLY.ts' not found.

I did not add COMPUTE_PATHS_ONLY.ts to my Git repository. The other files in the repo remain unchanged. What could have caused this?

Answer №1

I found a solution that worked for me on this particular issue by referring to the following thread: https://github.com/Microsoft/TypeScript/issues/7445

The error message I encountered indicated a mismatch between the targets (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets) and the tasks dll (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\TypeScript.Tasks.dll). This seemed to be caused by an installer issue related to the order of installing different versions.

To address this, please try the following steps:

  • 1. Uninstall TS 1.8.* from Add/Remove Programs.
  • 2. Uninstall TS 1.7.* from Add/Remove Programs.
  • 3. Check if the folder C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript is empty, and manually remove any content if present.
  • 4. Reinstall TS 1.7.6; you should see the folder created in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript.

Answer №2

I found the resolution by relocating the directory to

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript

from its previous location at

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\TypeScript

and replacing all files in the destination folder.

Answer №4

Although the steps outlined above may not guarantee a solution to your issue, I discovered that even after following them diligently, I continued to encounter the same compiler error. I attempted restarting my machine post the "uninstall and install" process, but unfortunately, it did not resolve the problem. It was only when I realized that instead of utilizing the control panel, one should make use of the package manager (by Right Clicking on the solution and selecting "Manage Nuget packages for solution") that I found success. To solve the issue, uninstall the TS package from the package manager for your project first, then proceed with installing the package again before rebuilding.

Link to image showing project settings

Answer №5

When I encountered this issue, I was utilizing VS 2015 with type script version 1.8. However, updating my VS 2015 to update_3 resolved the problem for me. Here is the link to the solution

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

Angular - Collaborative HTML format function

In my project, I have a function that sets the CSS class of an element dynamically. This function is used in different components where dynamic CSS needs to be applied. However, every time I make a change to the function, I have to update it in each compo ...

Exporting ExpressJS from a TypeScript wrapper in NodeJS

I've developed a custom ExpressJS wrapper on a private npm repository and I'm looking to export both my library and ExpressJS itself. Here's an example: index.ts export { myExpress } from './my-express'; // my custom express wrap ...

How can we ensure that only one of two props is specified during compilation?

I've designed a customized Button component. interface Button { href?: string; action(): void; } I'm looking to ensure that when a consumer uses this Button, they can only pass either href or action as a prop, not both. I want TypeScri ...

The process of running a program in debug mode that makes use of CreateProcess to invoke a link

Currently, I am utilizing the CreateProcess function to trigger the compilation and linking of another C++ program (TestProg.cxx) into a DLL using the cl and link commands. Through my research, I have identified the appropriate compilation and linkage opti ...

Utilizing classes as types in TypeScript

Why is it possible to use a class as a type in TypeScript, like word: Word in the provided code snippet? class Dict { private words: Words = {}; // I am curious about this specific line add(word: Word) { if (!this.words[word.term]) { this.wor ...

ESLint is indicating an error when attempting to import the screen from @testing-library/react

After importing the screen function from @testing-library/react, I encountered an ESLint error: ESLint: screen not found in '@testing-library/react'(import/named) // render is imported properly import { render, screen } from '@testing-lib ...

Attempting to invoke a TypeScript firebase function

I'm currently working on incorporating Firebase functions in my index.ts file: import * as functions from "firebase-functions"; export const helloWorld = functions.https.onRequest((request, response) => { functions.logger.info(" ...

In Ionic 2, any modifications made to the data model will only be reflected in the user interface after there is

Q) Why does my data seem to magically appear on the UI after interacting with it, even though I have made changes in the backend? For instance, when fetching and updating data bound to a list, such as: this._LocalStorageService.getClients().then( (data ...

Different ways to update the AutoComplete Style attribute

MuiInput-formControl { margin-top: 16px; Is there a way to reset the marginTop property to zero? I attempted the following method, but it was not successful. MuiFormControlLabel: { marginTop: 0, }, <Autocomplete disabl ...

Webpack and React.js: Additional loaders might be required to manage the output generated by these loaders

An error occurred while parsing the module in ./productFlow/index.tsx at line 3, column 12. The file was processed with the following loaders: * ./node_modules/awesome-typescript-loader/dist/entry.js. It seems like an additional loader may be needed to h ...

Tips for attaching an event listener to a div element that is accessed by reference in a React and TypeScript environment

I am attempting to attach an event listener to the div element using a ref. In my code, I have added a ref called div_ref to the Wrapper div and accessed that div_ref in the enableDragEventListeners method to add event listeners to it on component mount. ...

Using Typescript to customize the color of Ionic's Ion-checkbox

I am attempting to modify the color of the ion-checkbox using TypeScript <ion-item > <ion-label id="check1">No</ion-label> <ion-checkbox color="blue" id="box1" [(ngModel)]="todo.check1" name="check1"></ion-checkbox&g ...

Retrieve the value of a class property by using a variable name entered by the user

Essentially, I have a class that resembles the example below, but with more properties: Public Class inventory Public Property id As Integer Public Property name As String End Class In another class, I have a list called "orders" of the class "in ...

Storing the typeof result in a variable no longer aids TypeScript in type inference

Looking at the code snippet below: export const func = (foo?: number) => { const isNumber = typeof foo === 'number'; return isNumber ? Math.max(foo, 0) : 0; }; A problem arises when TypeScript complains that you cannot apply undefined to ...

Ways to convert a string into a Date object without using moment.js

I am facing a challenge with 2 dates that are stored in the following format: "04.12.2019, 09:35" // Today "05.12.2019, 12:50" // Another date I need to compare these dates to determine if they have passed or are yet to come. My initial approach was to ...

Creating Versatile Functions for HttpClient Wrapping

Scenario: In my set of services, I find myself repeatedly writing code for data calls which results in a lot of duplicated code. To streamline the process and reduce redundancy, I am looking to implement a wrapper function: All these functions essentiall ...

Make sure the auto import feature in TypeScript Visual Studio Code Editor is set to always use the ".js" extension

At times, the auto-import completion feature includes the .js extension, but inconsistently. When this extension is missing in the TypeScript source, the emitted JavaScript file may encounter runtime issues like module not found error since the tsc compile ...

Opening a modal from a different component in Angular 6

I am attempting to launch a modal that is associated with a separate component. However, I encountered an error ERROR TypeError: Cannot read property 'show' of undefined Here is my code: product-catalog.component.html <app-cart-table-modal& ...

Disable all typings within a specified namespace for a specific file

I need to disable typechecking for a specific namespace called MyNamespace in a Typescript file. Is there a way to achieve this without affecting other files? ...

Using the useState hook in a loop can sometimes result in a unique key error

Trying to add multiple items for rendering in my browser, but encountering an issue after clicking addItem. The item does render, however, I am getting the following error message: 'Warning: Each child in a list should have a unique ""key"" ...