Comments (1)
I'm adding this comment to share this workaround I found to overcome a rather common issue which is happening due to this DefinitelyTyped/core-js issue which strongly affects the Visual Studio TypeScript compiler.
The compilation errors you can receive are the following:
Error TS2693 Build:'Map' only refers to a type, but is being used as a value here.
Error TS2693 Build:'Promise' only refers to a type, but is being used as a value here.
Error TS2693 Build:'Set' only refers to a type, but is being used as a value here.
Error TS2304 Build:Cannot find name 'Iterable'.
Error TS2304 Build:Cannot find name 'IterableIterator'.
Error TS2304 Build:Cannot find name 'MapConstructor'.
Error TS2304 Build:Cannot find name 'Iterator'.
Error TS2304 Build:Cannot find name 'PromiseConstructor'.
Error TS2304 Build:Cannot find name 'PropertyKey'.
Error TS2304 Build:Cannot find name 'SetConstructor'.
Error TS2304 Build:Cannot find name 'Symbol'.
Error TS2304 Build:Cannot find name 'WeakMapConstructor'.
Error TS2304 Build:Cannot find name 'WeakSetConstructor'.
Error TS2339 Build:Property 'for' does not exist on type 'SymbolConstructor'.
Error TS2339 Build:Property 'hasInstance' does not exist on type 'SymbolConstructor'.
Error TS2339 Build:Property 'isConcatSpreadable' does not exist on type 'SymbolConstructor'.
Error TS2339 Build:Property 'iterator' does not exist on type 'SymbolConstructor'.
Error TS2339 Build:Property 'keyFor' does not exist on type 'SymbolConstructor'.
Error TS2339 Build:Property 'match' does not exist on type 'SymbolConstructor'.
Error TS2339 Build:Property 'replace' does not exist on type 'SymbolConstructor'.
Error TS2339 Build:Property 'search' does not exist on type 'SymbolConstructor'.
Error TS2339 Build:Property 'species' does not exist on type 'SymbolConstructor'.
Error TS2339 Build:Property 'split' does not exist on type 'SymbolConstructor'.
Error TS2339 Build:Property 'toPrimitive' does not exist on type 'SymbolConstructor'.
Error TS2339 Build:Property 'toStringTag' does not exist on type 'SymbolConstructor'.
Error TS2339 Build:Property 'unscopables' does not exist on type 'SymbolConstructor'.
.. and so on.
The problem is due to an internal issue within that third-party library. We can fix that by specifying a fixed/unaffected version, so our project won't update it anymore with the latest build (which is causing the issue).
In order to do that open the project's package.json file and replace this:
"scripts": {
"postinstall": "typings install dt~core-js --global"
}
with this:
"scripts": {
"postinstall": "typings install [email protected]+20161130133742 --global"
}
I will release a GitHub patch later today to fix the source code as well.
N.B.: There are many other possible ways to work around this problem: I chose this one because it doesn't require any significative change to the source code, thus making it easier to pull off for those who purchased the book.
from aspdotnet-core-and-angular-2.
Related Issues (13)
- Code won't compile because of some typescript error HOT 9
- Chapter 6: ng2-bootstrap TypeError HOT 2
- Loading all js libraries on initial load HOT 1
- Chapter 8: AccountsController - facebook login not working with IE 11. HOT 5
- OpenIddict refresh required on VS2017 code HOT 2
- OpenIddict v1.0.0-beta1-0481 - No longer supports OpenIddictUser HOT 7
- post script typings install doesn't work HOT 2
- Can't login after password changing. HOT 1
- Does not build & run using latest version of .net HOT 2
- Stuck on "Loading..." HOT 1
- Bad request with authservice.get() HOT 1
- user.identity.isauthenticated always false ??? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspdotnet-core-and-angular-2.