Git Product home page Git Product logo

Comments (2)

Darkseal avatar Darkseal commented on June 29, 2024

Hello and thanks for your feedback.

I suggest you to try the following:

Also take a look to the following issue for further details about TS and typings-related problems.

from aspdotnet-core-and-angular-2.

Darkseal avatar Darkseal commented on June 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.