flauc / angular2-notifications

A light and easy to use notifications library for Angular.
https://stackblitz.com/edit/angular2-notifications-example
MIT License
746 stars 163 forks source link

Reference to core-js in notification.type.d.ts #136

Open serddmitry opened 7 years ago

serddmitry commented 7 years ago

I don't have @types/core-js in my project, and due to this line /// <reference types="core-js" /> in lib/notification.type.d.ts the compiler emits error:

Cannot find type definition file for 'core-js'.

Note: I don't have core-js because of: https://github.com/AngularClass/angular2-webpack-starter/issues/812

serddmitry commented 7 years ago

--noResolve argument for TypeScript compiler seems to fix this. But it might be not an option for some users, I guess. https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html

joedayz commented 7 years ago

I delete the first line in notification.type.d.ts and passed , but is a poor solution. The problem is when I execute: $ npm run build:prod and it use webpack.

/// <reference types="core-js" /> <------------delete it line import { EventEmitter } from '@angular/core'; export interface Notification

Naono commented 7 years ago

I updated the NPM package today, all package up to the latest version except this one. I still use the version 0.4.47, because this version has no error. Maybe this needs more compatibility test especially when other libs updated.

Hehohehoheho commented 7 years ago

I'm having the same issue, rolling back to v0.4.47 did not work for me. Any ideas on how I can fix this? Is core-js really needed?

joedayz commented 7 years ago

I did an upgrade to my angular 2 core and now all is ok.

"dependencies": { "@angular/common": "^2.4.6", "@angular/compiler": "^2.4.1", "@angular/core": "^2.4.6", "@angular/forms": "^2.4.6", "@angular/http": "^2.3.1", "@angular/platform-browser": "^2.3.1", "@angular/platform-browser-dynamic": "^2.3.1", "@angular/router": "^3.3.1", "@progress/kendo-angular-buttons": "^0.10.3", "@progress/kendo-angular-dateinputs": "^0.3.5", "@progress/kendo-angular-dialog": "^0.14.1", "@progress/kendo-angular-dropdowns": "^0.27.7", "@progress/kendo-angular-grid": "^0.13.2", "@progress/kendo-angular-inputs": "^0.18.7", "@progress/kendo-angular-intl": "^0.9.1", "@progress/kendo-angular-layout": "^0.21.4", "@progress/kendo-angular-popup": "^0.16.1", "@progress/kendo-angular-upload": "^0.13.1", "@progress/kendo-data-query": "^0.3.5", "@progress/kendo-date-math": "^0.3.2", "@progress/kendo-popup-common": "^0.3.1", "@progress/kendo-theme-default": "^2.11.22", "@telerik/kendo-dropdowns-common": "^0.2.2", "@telerik/kendo-theme-default": "^1.33.4", "X-editable": "github:vitalets/x-editable", "angular-in-memory-web-api": "^0.2.1", "angular2-busy": "^1.0.2", "angular2-jwt": "^0.1.27", "angular2-notifications": "0.4.47", "bootstrap": "^3.3.7", "bootstrap-colorpicker": "^2.3.5", "bootstrap-duallistbox": "github:istvan-ujjmeszaros/bootstrap-duallistbox", "bootstrap-markdown": "^2.10.0", "bootstrap-progressbar": "^0.9.0", "bootstrap-slider": "^9.1.3", "bootstrap-tagsinput": "^0.7.1", "bootstrap-timepicker": "^0.5.2", "chart.js": "^2.3.0", "clockpicker": "0.0.7", "clone": "~2.0.0", "core-js": "^2.4.1", "debounce": "^1.0.0", "dropzone": "^4.3.0", "dygraphs": "^1.1.1", "font-awesome": "^4.7.0", "fuelux": "^3.15.8", "he": "^1.1.0", "highcharts": "^4.2.7", "ion-rangeslider": "^2.1.4", "jquery": "^2.2.4", "jquery-color": "^1.0.0", "jquery-jcrop": "^0.9.13", "jquery-knob": "^1.2.11", "jquery-ui-npm": "^1.12.0", "jquery-validation": "^1.15.1", "jquery.maskedinput": "^1.4.1", "markdown": "^0.5.0", "morris.js": "^0.5.0", "ng2-auto-complete": "^0.7.4", "ng2-bootstrap": "^1.3.3", "ng2-charts": "^1.5.0", "ng2-completer": "^0.2.3", "ng2-datepicker": "^1.1.1", "ng2-popover": "0.0.13", "ng2-redux": "4.2.1", "nouislider": "^8.5.1", "primeng": "^2.0.0", "raphael": "^2.2.1", "redux": "^3.6.0", "rxjs": "^5.1.0", "scriptjs": "^2.5.8", "select2": "^4.0.3", "smartadmin-plugins": "^1.0.15", "summernote": "^0.8.1", "to-markdown": "^3.0.1", "ts-helpers": "^1.1.1", "webpack": "^2.2.0-rc.3", "zone.js": "^0.7.2" }, "devDependencies": { "@angular/compiler": "^2.4.1", "@angularclass/hmr": "~1.2.2", "@angularclass/hmr-loader": "~3.0.2", "@types/core-js": "^0.9.35", "@types/hammerjs": "^2.0.33", "@types/jasmine": "2.5.41", "@types/node": "^6.0.38", "@types/selenium-webdriver": "2.53.33", "@types/source-map": "^0.1.27", "@types/uglify-js": "^2.0.27", "@types/webpack": "^1.12.34", "angular-router-loader": "^0.4.0", "angular2-template-loader": "^0.6.0", "assets-webpack-plugin": "^3.5.0", "awesome-typescript-loader": "^2.2.1", "codelyzer": "~1.0.0-beta.4", "copy-webpack-plugin": "^4.0.0", "css-loader": "^0.26.0", "exports-loader": "^0.6.3", "expose-loader": "^0.7.1", "file-loader": "^0.9.0", "gh-pages": "^0.12.0", "html-minify-loader": "^1.1.0", "html-webpack-plugin": "^2.21.0", "ie-shim": "^0.1.0", "imports-loader": "^0.6.5", "istanbul-instrumenter-loader": "0.2.0", "json-loader": "^0.5.4", "karma": "^1.2.0", "karma-chrome-launcher": "^2.0.0", "karma-coverage": "^1.1.1", "karma-jasmine": "^1.0.2", "karma-mocha-reporter": "^2.0.0", "karma-remap-coverage": "^0.1.1", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "1.8.0", "parse5": "^2.2.2", "protractor": "^4.0.10", "raw-loader": "0.5.1", "reflect-metadata": "^0.1.9", "rimraf": "~2.5.4", "script-ext-html-webpack-plugin": "^1.3.2", "script-loader": "^0.7.0", "source-map-loader": "^0.1.5", "string-replace-loader": "1.0.5", "style-loader": "^0.13.1", "to-string-loader": "^1.1.4", "ts-helpers": "1.1.2", "ts-node": "^1.7.0", "tslint": "~3.15.1", "tslint-loader": "^2.1.5", "typedoc": "^0.5.0", "typescript": "2.1.1", "url-loader": "^0.5.7", "v8-lazy-parse-webpack-plugin": "^0.3.0", "webpack": "^2.2.0-rc.3", "webpack-dev-middleware": "^1.6.1", "webpack-dev-server": "^2.3.0", "webpack-md5-hash": "^0.0.5", "webpack-merge": "~1.0.1" },