Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Webpack Guide - Incorrect Typescript configuration #2890

Closed
@skryvets

Description

@skryvets

Overview of the issue: After steps completion of "Webpack Configuration" dev-server throws a bunch of errors in the console. Please see stack trace:

ERROR in [default] ng-webpack/node_modules/@angular/common/src/directives/ng_class.d.ts:46:33 
Cannot find name 'Set'.

ERROR in [default] ng-webpack/node_modules/@angular/common/src/pipes/async_pipe.d.ts:44:37 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/compile_metadata.d.ts:369:29 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/compile_metadata.d.ts:415:29 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/compile_metadata.d.ts:416:19 
Cannot find name 'Set'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/compile_metadata.d.ts:417:14 
Cannot find name 'Set'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/compile_metadata.d.ts:418:245 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/directive_normalizer.d.ts:38:71 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/directive_normalizer.d.ts:40:73 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/metadata_resolver.d.ts:62:17 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/offline_compiler.d.ts:18:31 
Cannot find name 'Map'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/offline_compiler.d.ts:32:86 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/offline_compiler.d.ts:49:8 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/output/output_ast.d.ts:427:62 
Cannot find name 'Set'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/resource_loader.d.ts:13:22 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/runtime_compiler.d.ts:44:48 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/runtime_compiler.d.ts:46:64 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/util.d.ts:26:17 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/compiler/src/util.d.ts:27:45 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/application_init.d.ts:16:17 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/application_ref.d.ts:106:66 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/application_ref.d.ts:122:100 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/application_ref.d.ts:148:66 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/application_ref.d.ts:150:100 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts:24:14 
Cannot find name 'Map'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts:28:15 
Cannot find name 'Map'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/di/reflective_provider.d.ts:88:122 
Cannot find name 'Map'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/di/reflective_provider.d.ts:88:164 
Cannot find name 'Map'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/facade/lang.d.ts:12:16 
Cannot find name 'Map'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/facade/lang.d.ts:13:16 
Cannot find name 'Set'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/linker/compiler.d.ts:53:48 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/linker/compiler.d.ts:61:64 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/linker/ng_module_factory_loader.d.ts:14:33 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/linker/system_js_ng_module_factory_loader.d.ts:28:24 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/core/src/util/lang.d.ts:8:52 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/http/src/headers.d.ts:52:58 
Cannot find name 'Map'.

ERROR in [default] ng-webpack/node_modules/@angular/http/src/url_search_params.d.ts:46:15 
Cannot find name 'Map'.

ERROR in [default] ng-webpack/node_modules/@angular/platform-browser-dynamic/src/resource_loader/resource_loader_impl.d.ts:10:22 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/platform-browser/src/browser/browser_adapter.d.ts:79:32 
Cannot find name 'Map'.

ERROR in [default] ng-webpack/node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts:97:41 
Cannot find name 'Map'.

ERROR in [default] ng-webpack/node_modules/@angular/platform-browser/src/dom/dom_renderer.d.ts:22:36 
Cannot find name 'Map'.

ERROR in [default] ng-webpack/node_modules/@angular/router/src/config.d.ts:319:61 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/router/src/interfaces.d.ts:78:98 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/router/src/interfaces.d.ts:157:108 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/router/src/interfaces.d.ts:227:114 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/router/src/interfaces.d.ts:297:90 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/router/src/interfaces.d.ts:367:49 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/router/src/router.d.ts:393:69 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/router/src/router.d.ts:415:58 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/@angular/router/src/utils/collection.d.ts:35:57 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/rxjs/Observable.d.ts:10:65 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/rxjs/Observable.d.ts:66:59 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/rxjs/Observable.d.ts:66:69 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/rxjs/observable/PromiseObservable.d.ts:40:30 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/rxjs/observable/PromiseObservable.d.ts:41:25 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/rxjs/operator/toPromise.d.ts:7:58 
Cannot find name 'Promise'.

ERROR in [default] ng-webpack/node_modules/rxjs/operator/toPromise.d.ts:7:68 

Angular Version: 2.2.0

Browsers and Operating System: Problem doesn't depend on browser/OS.

Steps to reproduce:

  1. Follow the instruction provided in order to configure angular2 with webpack.
  2. Run npm start

Expected Result: There shouldn't be any errors when the server started.
Actual result: Errors are shown in the console.

Note: In order to avoid step 1 you can grab configuration from this repository. In order to reproduce the issue, please check out HEAD to the "Initial commit".

Related Issues: No.

Fix: I will provide a fix in a separate pull request for it by changing tsconfig.json appropriately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions