angular2-packaging icon indicating copy to clipboard operation
angular2-packaging copied to clipboard

When run npm run tsc I get lots of ES6 shim errors in git bash

Open markoddi01 opened this issue 9 years ago • 2 comments

error1 When run npm run tsc I get lots of ES6 shim errors in git bash

markoddi01 avatar May 12 '16 19:05 markoddi01

I then installed npm install -g typescript. And got this git bash error: "Unknown compiler option 'moduleResolution' "

markoddi01 avatar May 12 '16 20:05 markoddi01

There are several problems here:

  • You need to exclude typings/main and typings/main.d.ts within the tscconfig.json file
{
  "compilerOptions": {
    (...)
  },
  "exclude": [
    "node_modules",
    "typings/main",
    "typings/main.d.ts"
  ]
}
  • You only need to use es6-shim in the typings.json file.
{
  "ambientDependencies": {
    "es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd"
  }
}

templth avatar May 18 '16 07:05 templth