Error trying to run official Angular2 Quickstart example

Asked

Viewed 172 times

0

I am starting a project to study Angular2, and for that I am using Debian 8 with Node V6.3.1 (npm v3.10.3).

Following the step by step official Angular2 Quickstart:

#git clone  https://github.com/angular/quickstart  my-proj
#cd my-proj
#rm -rf .git
#npm install
npm WARN lifecycle [email protected]~postinstall: cannot run in wd %s %s (wd=%s) [email protected] typings install /var/angular2/my-proj
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN optional Skipping failed optional dependency /browser-sync/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
#
#npm start

When rotating the npm start then a multitude of errors appear:

node_modules/@angular/common/src/directives/ng_class.d.ts(81,35): error TS2304: Cannot find name 'Set'.
node_modules/@angular/common/src/facade/async.d.ts(34,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/async.d.ts(35,45): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/lang.d.ts(11,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/common/src/facade/lang.d.ts(12,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/common/src/facade/lang.d.ts(68,59): error TS2304: Cannot find name 'Map'.
node_modules/@angular/common/src/facade/promise.d.ts(9,14): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(15,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(16,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(17,35): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(17,93): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(18,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(18,50): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(19,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(19,149): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(20,43): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/pipes/async_pipe.d.ts(41,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(79,88): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(137,42): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(196,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,15): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(26,16): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(115,123): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(115,165): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/async.d.ts(34,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/async.d.ts(35,45): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/collection.d.ts(1,25): error TS2304: Cannot find name 'MapConstructor'.
node_modules/@angular/core/src/facade/collection.d.ts(2,25): error TS2304: Cannot find name 'SetConstructor'.
node_modules/@angular/core/src/facade/collection.d.ts(4,27): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(4,39): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(7,9): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(8,30): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(11,43): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(12,27): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(14,23): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(15,25): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(100,41): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/collection.d.ts(101,22): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/collection.d.ts(102,25): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/lang.d.ts(11,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/lang.d.ts(12,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/lang.d.ts(68,59): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/promise.d.ts(9,14): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(15,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(16,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(17,35): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(17,93): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(18,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(18,50): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(19,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(19,149): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(20,43): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/compiler.d.ts(13,59): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/component_resolver.d.ts(9,58): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/component_resolver.d.ts(13,49): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(61,148): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(102,144): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(107,139): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(108,135): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/systemjs_component_resolver.d.ts(18,53): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/systemjs_component_resolver.d.ts(26,53): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/testing/component_fixture.d.ts(77,19): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/testing/test_component_builder.d.ts(74,57): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser-dynamic/index.d.ts(81,90): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser-dynamic/index.d.ts(85,99): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser-dynamic/index.d.ts(89,99): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(96,42): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/dom_renderer.d.ts(17,37): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/async.d.ts(34,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/facade/async.d.ts(35,45): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(1,25): error TS2304: Cannot find name 'MapConstructor'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(2,25): error TS2304: Cannot find name 'SetConstructor'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(4,27): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(4,39): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(7,9): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(8,30): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(11,43): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(12,27): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(14,23): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(15,25): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(100,41): error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(101,22): error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(102,25): error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/facade/lang.d.ts(11,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/lang.d.ts(12,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/facade/lang.d.ts(68,59): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/promise.d.ts(9,14): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/facade/promise.d.ts(15,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/facade/promise.d.ts(16,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/facade/promise.d.ts(17,35): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/facade/promise.d.ts(17,93): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/facade/promise.d.ts(18,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/facade/promise.d.ts(18,50): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/facade/promise.d.ts(19,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/facade/promise.d.ts(19,149): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/facade/promise.d.ts(20,43): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/web_workers/shared/client_message_broker.d.ts(32,65): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/web_workers/shared/client_message_broker.d.ts(40,56): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/web_workers/shared/service_message_broker.d.ts(35,84): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/web_workers/worker/location_providers.d.ts(21,86): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/Observable.d.ts(10,66): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/Observable.d.ts(66,60): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/Observable.d.ts(66,70): error TS2304: Cannot find name 'Promise'.
app/app.component.spec.ts(16,1): error TS2304: Cannot find name 'describe'.
app/app.component.spec.ts(17,3): error TS2304: Cannot find name 'it'.
app/app.component.spec.ts(18,5): error TS2304: Cannot find name 'expect'.
app/app.component.spec.ts(22,1): error TS2304: Cannot find name 'describe'.
app/app.component.spec.ts(24,3): error TS2304: Cannot find name 'it'.
app/app.component.spec.ts(27,40): error TS7006: Parameter 'fixture' implicitly has an 'any' type.
app/app.component.spec.ts(28,7): error TS2304: Cannot find name 'expect'.
app/app.component.spec.ts(32,3): error TS2304: Cannot find name 'it'.
app/app.component.spec.ts(35,42): error TS7006: Parameter 'fixture' implicitly has an 'any' type.
app/app.component.spec.ts(38,43): error TS7006: Parameter 'el' implicitly has an 'any' type.
app/app.component.spec.ts(42,7): error TS2304: Cannot find name 'expect'.
e2e/app.e2e-spec.ts(2,1): error TS2304: Cannot find name 'describe'.
e2e/app.e2e-spec.ts(7,3): error TS2304: Cannot find name 'beforeEach'.
e2e/app.e2e-spec.ts(8,5): error TS2304: Cannot find name 'browser'.
e2e/app.e2e-spec.ts(11,3): error TS2304: Cannot find name 'it'.
e2e/app.e2e-spec.ts(12,5): error TS2304: Cannot find name 'expect'.
e2e/app.e2e-spec.ts(12,12): error TS2304: Cannot find name 'element'.
e2e/app.e2e-spec.ts(12,20): error TS2304: Cannot find name 'by'.

npm ERR! Linux 3.16.0-4-686-pae

My question: why are these mistakes happening? How can I solve them?

Update......... 28/07/2016 14:36

It became operational after performing the procedure described by Rodrigo Rigotti

See if you have a typings folder in your project; if not, run the commando npm run typings -- install. If yes, try to change the attribute "target" in the typings.json file for "es6".

However, some Warns remain when executing the npm install:

npm WARN lifecycle [email protected]~postinstall: cannot run in wd %s %s (wd=%s) [email protected] typings install /var/angular2/my-proj
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN optional Skipping failed optional dependency /browser-sync/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

Thank you in advance for any help in understanding or resolving these Warns.

  • 1

    See if you have a folder typings in your project; if not, run the command npm run typings -- install. If yes, try changing the "target" attribute in the file typings.json for "es6".

  • Thank you so much for your help! This way it worked... there are still some "npm install"... but npm start is already working. Below Warns that are still appearing.....

  • @Rodrigorigotti, I’m waiting for you to post your question to mark you as chosen.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.