Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

ASP.NET Core WebAPI + Angular Project Errors on Build TS005

$
0
0

I have an empty ASP.NET Core WebAPI project setup in Visual Studio 2017.  It compiled fine with some AngularJS files and index.html.  I am trying to change by JS files to TS and add a transpiler via Gulp.  The gulp transpile is completing successful and creating the JS files. The problem is when I go to build in Visual Studio it throws tons of errors related to the jquery typings file in the node_modules directory (which is not even included in the project).

...node_modules\@types\jquery\index.d.ts(47,40): error TS1005: Build:',' expected.

I installed both angular and jquery typings using the following commands:

npm install @types/angular

Here is my current tsconfig.json:

{"compilerOptions": {"target": "ES5","noImplicitAny": false,"removeComments": false,"sourceMap": false,"allowJs": false,"lib": ["dom","es5","scripthost","es2015.iterable"
    ]
  },"include": ["./Scripts/**/*.ts"
  ],"compileOnSave": true
}

I tried one website's suggestion of including a jsconfig.json file with the following settings (but it did not work):

{"exclude": ["./wwwroot","./node_modules"
  ]
}

Any ideas on what is wrong with Visual Studio and why these errors are coming up?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>