Typescript compile error: Property 'classList' does not exist on type 'Node'

Windows 7 x64 Compiling using gulp-typescript 2.7.7 using typescript 1.5 beta Getting error: Property 'classList' does not exist on type 'Node' because of statement I see that classList is...

How to run typescript compiler as a package.json script without grunt or gulp

I don't want to use grunt or gulp to compile ts files. I just want to do it in my package.json something like this: "scripts": { "build": "tsc main.ts dist/" }, is it possible?

How to use async/await with Gulp 4?

I'm trying to do something like this: gulp.task("test", async () => { return gulp.src("**/*.scss") .pipe(print((filePath) => `File: ${filePath}`)); }); (print is gulp-print) But it...

npm - "Can't find Python executable "python", you can set the PYTHON env variable."

I'm trying to run the following command: npm install -g bower gulp cordova ionic [email protected] karma-cli protractor node-gyp coffee-script js-beautify typescript npm-check I have installed Python,...

Uncaught ReferenceError: exports is not defined and require

I'm using angularjs and typescript to create some app, I'm having a trouble with this error that I can't solve Here is my *.ts code export var NgApp = new application.Startup(); ///<reference...

Typescript: Property 'src' does not exist on type 'HTMLElement'

I get a error from Typescript and I am not sure how to correct it. The code works fine when "compiled" but I can't correct the error. I have extracted the parts that involve the error from my...

How can moment.js be imported with typescript?

I'm trying to learn Typescript. While I don't think it's relevant, I'm using VSCode for this demo. I have a package.json that has these pieces in it: { "devDependencies": { "gulp":...

Node and docker - how to handle babel or typescript build?

I have a node application that I want to host in a Docker container, which should be straight forward, as seen in this article: https://nodejs.org/en/docs/guides/nodejs-docker-webapp/ In my...

Visual Studio Code Automatic Imports

I'm in the process of making the move from Webstorm to Visual Studio Code. The Performance in Webstorm is abysmal. Visual studio code isn't being very helpful about finding the dependencies I...

Invoking TypeScript compiler as NPM module

I have a project written in TypeScript and I use a task runner for building (whatever: Gulp, Jake, etc.). The TypeScript compiler i use is the one I installed from NPM: npm install...

error TS2304: Cannot find name 'Promise'

Hello guys I went through all solution avaialble on stackoverflow. But none of work for me. Hence posting question. tsconfig.json { "version":"2.13.0", "compilerOptions": { "target":...

Why is the TypeScript compiler ignoring tsconfig.json?

I have this file, pasted from a tutorial (and let's face it, the disparity between docs, tuts, and examples is astounding): /scripts/tsconfig.json: { "compilerOptions": { ...

TS cannot find modules

I have used https://github.com/FountainJS/generator-fountain-webapp to set up a new project using React & Typescript. I'm pretty comfortable with JS having used node for an ongoing project, but...

How to bundle typescript files for the browser user gulp and tsproject?

I'm kinda new to front end development, being a long time backend C# and Java developer, and I'm trying to come to grips with how to build front end applications. I would like to build an...

How to use generics with arrow functions in Typescript/JSX with React?

Using Typescript, typing in Visual Studio, into a ".ts" file, consider the following declaration: export const foo = <T>(myObject: T) => myObject.toString(); This works fine, type checking is...

Error using D3 with typescript in Visual Studio Code

I am pretty new to typescript. I am using Visual Studio Code as my editor and using gulp to execute typescript. I am looking to use d3 in my typescript code. I installed d3 using the below, npm...

Warning: error TS18002: The 'files' list in config file is empty

I'm using TypeScript 2.1.5.0. I've configured the grunt-typescript-using-tsconfig plugin as shown below but I get the error in the subject line when I execute the task. The problem is the...

Could not find a declaration file for module

I am trying to use a nodejs package which I created, can someone point out what am I doing wrong. here is how the package structure looks like: node_modules |__my_commons | |__dist | ...

Build:Cannot find type definition file for 'node'

VS 2015 community edition (at home), npm 3.10, Angular 2 Im trying to pull get Angular2 setup within an ASP.Net MVC 5 app. The template I started with used an older version of Angular, so I...

SyntaxError: Unexpected token import - import * as gulp from 'gulp'

If you run gulp, you will get the following error message. Is module required for gulpfile not installed? .. $ gulp [22:17:15] Failed to load external module ts-node/register [22:17:15] Failed to...

Load a node module from systemjs.config

I am working on an AngularJS2 app with typescript. One of my files uses a nodejs module. Now I have already installed @types/node using npm, however, running the application gives an error: GET...

'router-outlet' is not a known element

I have a mvc 5 project with a angular frontend . I wanted to add routing as described in this tutorial https://angular.io/guide/router. So in my _Layout.cshtml I added a <base href="/"> and...

How to stop Typescript compiler from generating JS and JS.MAP files in Visual Studio 2017?

I have a few typescript files for my app myapp in my Visual Studio 2017 ASP.NET project. I use a gulp task to generate the JS files, so I don't want the build or language service creating these JS...

How can I run gulp with a typescript file

Have a gulp project that uses a gulp.js file but my project is in typescript so I'd rather have a gulp file in typescript. It would be possible to break the process into two steps where...

Running Existing Angular Project locally

I am very new to Angular, I am trying to run an existing project of Angular on my machine. I have done a lot of tests and followed a lot of articles. But cannot run my project. I have the project...

Angular: Type 'Observable<boolean>' has no compatible call signatures

I'm still learning angular, and I want to make a service with a boolean observable, and subscribe to that observable. I followed this tutorial because what I really want is to hide menu nav links...

TypeScript -> JavaScript for browser: exports/require statements

I want to switch from JavaScript to TypeScript for our web app's scripts. However, when generating the JavaScript it always puts the following lines on top of the script: "use...

"gulp serve" returning "ReferenceError: primordials is not defined"

Today is day one with SPFx and Gulp and Yo etc. Trying a tutorial but it's blowing up with the following error: mini-3:helloworld-webpart admin$ gulp serve ReferenceError: primordials is not...

Angular 6 to 12 Migration: Getting Multiple Warning: Css Minimizer Plugin: > Unexpected "$"

After migrating my angular 6 project to 12. I am getting multiple warning in terminal if in angular.json i set optimisation: false configuration then all issue get resolved but i don't want to...

yo @microsoft/sharepoint fails on This generator (@microsoft/sharepoint:app) requires yeoman-environment at least 3.0.0, current version is 2.10.3

I have the following issue and I cannot fix it : C:\project> yo @microsoft/sharepoint Error @microsoft/sharepoint This generator (@microsoft/sharepoint:app) requires yeoman-environment at least...