Closed olakara closed 6 years ago
Hi olakara,
Yes i simply can't figure out why this happens (i get the same errors), but the only command that build runs is tsc
so if you call the command tsc
at the root everything should compile and you're good to go.
Hi @flauc , yes, I tried it and got it compiled.. but when I add the lib to my application, things don't work out.. I get the same set of errors and my application don't work :(
Since RC of angular, the es6-shim typings have been removed from the core. So the compiler does not understand all these references to es6 classes. The pull request #32 should fix this.
Hi @jbouzekri,
Thank you for your help. I just have one question before i merge.
Why remove this line from package.json
:
"main": "./components.js",
It's related to this issue #28
@flauc : I have just moved it at the bottom of the file to have the dependencies and the references to project file together (typings + main).
Wow i'm blind sorry. Once again thank you :+1:
I get the same error, can't build source and example also :(
I also got errors from running npm run build
(cloned at the latest commit: 3a7934951875a80714c43a21e43bc05599524d7c):
$ npm run build
> angular2-notifications@0.3.3 build /Users/armno/code/forks/angular2-notifications
> typings install && tsc
└── es6-shim (ambient)
src/push-notifications.service.ts(19,31): error TS2339: Property 'createBuffered' does not exist on type 'PushNotificationsService'.
Here are what I have done to get it runs:
npm install
in project's root directory and also inside of /example
directory.npm run build
from root directory, got the error above. The code in push-notifications.service.ts
was commented out. I uncomment them and run npm run build
again. It works.gulp serve
from root directory. It serves files from /example
but I got 404 on /app/main.js
from devtools' console.cd example/
and run ./node_modules/typescript/bin/tsc
command, got many errors (attached below) but it still compiles.gulp serve
again. Now the notification module works.(errors from 4.)
app/pusnNotifications.service.ts(28,20): error TS2304: Cannot find name 'Promise'.
app/pusnNotifications.service.ts(50,14): error TS2339: Property 'canCreate' does not exist on type 'PushNotificationsService'.
app/pusnNotifications.service.ts(51,18): error TS2339: Property 'notificationBuffer' does not exist on type 'PushNotificationsService'.
app/pusnNotifications.service.ts(52,13): error TS2346: Supplied parameters do not match any signature of call target.
app/pusnNotifications.service.ts(52,30): error TS2339: Property 'notificationBuffer' does not exist on type 'PushNotificationsService'.
app/pusnNotifications.service.ts(53,18): error TS2339: Property 'notificationBuffer' does not exist on type 'PushNotificationsService'.
node_modules/@angular/common/src/directives/ng_class.d.ts(81,34): error TS2304: Cannot find name 'Set'.
node_modules/@angular/common/src/pipes/async_pipe.d.ts(41,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(345,20): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(346,15): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/directive_normalizer.d.ts(19,100): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/compiler/src/directive_normalizer.d.ts(21,74): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/compiler/src/offline_compiler.d.ts(15,26): error TS2304: Cannot find name 'Map'.
node_modules/@angular/compiler/src/offline_compiler.d.ts(16,38): error TS2304: Cannot find name 'Map'.
node_modules/@angular/compiler/src/offline_compiler.d.ts(31,124): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/compiler/src/output/output_ast.d.ts(424,63): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/resource_loader.d.ts(13,23): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/compiler/src/runtime_compiler.d.ts(40,49): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/compiler/src/runtime_compiler.d.ts(42,65): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/compiler/src/template_parser/template_parser.d.ts(45,12): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/util.d.ts(35,18): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/compiler/src/util.d.ts(36,46): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/compiler/src/view_compiler/compile_element.d.ts(33,16): error TS2304: Cannot find name 'Map'.
node_modules/@angular/compiler/src/view_compiler/compile_query.d.ts(24,49): error TS2304: Cannot find name 'Map'.
node_modules/@angular/compiler/src/view_compiler/compile_view.d.ts(29,18): error TS2304: Cannot find name 'Map'.
node_modules/@angular/compiler/src/view_compiler/compile_view.d.ts(51,16): error TS2304: Cannot find name 'Map'.
node_modules/@angular/compiler/src/view_compiler/compile_view.d.ts(53,13): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/application_init.d.ts(16,18): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(106,67): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(122,101): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(148,67): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(150,101): 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(28,16): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(88,123): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(88,165): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(2,25): error TS2304: Cannot find name 'MapConstructor'.
node_modules/@angular/core/src/facade/collection.d.ts(3,25): error TS2304: Cannot find name 'SetConstructor'.
node_modules/@angular/core/src/facade/collection.d.ts(5,27): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(5,39): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(8,9): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(9,30): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(12,43): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(13,27): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(15,23): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(16,25): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(101,41): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/collection.d.ts(102,22): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/collection.d.ts(103,25): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/lang.d.ts(12,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/lang.d.ts(13,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/lang.d.ts(51,59): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/linker/compiler.d.ts(53,49): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/compiler.d.ts(61,65): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/ng_module_factory_loader.d.ts(14,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/system_js_ng_module_factory_loader.d.ts(28,25): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/forms/src/directives.d.ts(26,46): error TS2314: Generic type 'Type<T>' requires 1 type argument(s).
node_modules/@angular/forms/src/directives.d.ts(27,50): error TS2314: Generic type 'Type<T>' requires 1 type argument(s).
node_modules/@angular/forms/src/directives.d.ts(28,50): error TS2314: Generic type 'Type<T>' requires 1 type argument(s).
node_modules/@angular/forms/src/directives.d.ts(46,39): error TS2314: Generic type 'Type<T>' requires 1 type argument(s).
node_modules/@angular/forms/src/directives.d.ts(50,48): error TS2314: Generic type 'Type<T>' requires 1 type argument(s).
node_modules/@angular/forms/src/directives/select_multiple_control_value_accessor.d.ts(12,18): error TS2314: Generic type 'Type<T>' requires 1 type argument(s).
node_modules/@angular/forms/src/form_providers.d.ts(13,38): error TS2314: Generic type 'Type<T>' requires 1 type argument(s).
node_modules/@angular/forms/src/form_providers.d.ts(18,47): error TS2314: Generic type 'Type<T>' requires 1 type argument(s).
node_modules/@angular/platform-browser-dynamic/src/resource_loader/resource_loader_impl.d.ts(10,23): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser/src/browser/browser_adapter.d.ts(79,33): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(97,42): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/dom_renderer.d.ts(18,37): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(2,25): error TS2304: Cannot find name 'MapConstructor'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(3,25): error TS2304: Cannot find name 'SetConstructor'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(5,27): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(5,39): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(8,9): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(9,30): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(12,43): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(13,27): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(15,23): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(16,25): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(101,41): error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(102,22): error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/facade/collection.d.ts(103,25): error TS2304: Cannot find name 'Set'.
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'.
node_modules/rxjs/observable/PromiseObservable.d.ts(40,31): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/observable/PromiseObservable.d.ts(41,26): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(7,59): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(7,69): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(9,9): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(10,26): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(10,36): error TS2304: Cannot find name 'Promise'.
@flauc Could you explain how you set up dev environment please? Are there any thing required beyond package.json
s (e.g. globally installed node modules & their versions)?
This pull request should fix this issue #85 Solution based in this http://stackoverflow.com/a/37758982/5280365
Hi, I just cloned the lib and tried to
npm run build
, I get the following error:Any clue what I am doing wrong?