Typescript error TS2304: Cannot find name 'Map' in aurelia-binding@1.0.0-beta.1.3.6

Here are the steps to reproduce the problem:mkdir and cd into it..npm init and accept the defaultsjspm init.. accept defaults except don't use a transpilerjspm install aurelia-frameworkjspm

Here are the steps to reproduce the problem:

  1. mkdir and cd into it..
  2. npm init and accept the defaults
  3. jspm init.. accept defaults except don't use a transpiler
  4. jspm install aurelia-framework
  5. jspm install aurelia-bootstrapper
  6. Add an empty tsconfig.json file to the directory.. I've tried many tsconfig settings to fix this problem, but it works just the same with a simple { } configuration. I've even tried various mutations of https://github.com/aurelia/skeleton-navigation/blob/master/skeleton-typescript-asp.net5/src/skeleton-navigation-typescript-vs/tsconfig.json to no avail.
  7. tsc

At this point, you should stumble across the errors: jspm_packages/npm/aurelia-binding@1.0.0-beta.1.3.6/aurelia-binding.d.ts(331,25): error TS2304: Cannot find name 'Map'. jspm_packages/npm/aurelia-binding@1.0.0-beta.1.3.6/aurelia-binding.d.ts(353,49): error TS2304: Cannot find name 'Map'.

I'm guessing a dependency is missing?

In this repro, you'll also see some TS2304 errors in other aurelia*.d.ts files, but I'm not actually seeing those in my actual environment for some reason.

I've tried type adding the typings.json file from https://github.com/aurelia/skeleton-navigation/blob/master/skeleton-typescript-asp.net5/src/skeleton-navigation-typescript-vs/typings.json and then issued typings install, but that didn't change anything. Oddly enough, it didn't even help if I tried `typings install es6-promise --save'.

No matter what I try, I always get the same errors when I run tsc

For the record, I'm running the following versions...

  • npm v3.9.0
  • jspm v0.16.34
  • tsc v1.8.10

Any help is greatly appreciated.

You can use the new --lib option --lib es6 to just use the lib file for ES6 and still keep your compile target to be ES5.


More on lib option : https://github.com/Microsoft/TypeScript/issues/6974

(PS: its supported in alm https://github.com/alm-tools/alm/)

Translating... 0%