flauc / angular2-notifications

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

Angular 5 #262

Closed amihailes closed 6 years ago

amihailes commented 6 years ago

Hello,

Is it possible to have an anguler 5 compatible version? The 5 version is out this morning.

This will delete the warnings like:

npm WARN angular2-notifications@0.7.8 requires a peer of @angular/animations@^4.0.0 but none is installed. You must install peer dependencies yourself.

Thanks a lot,

Adrian

flauc commented 6 years ago

I am afraid not at the moment. However, I'll take the time this weekend to update the library. Then we should be safe to use it.

amihailes commented 6 years ago

Thanks a lot.

No problem for the update in the week-end.

Adrian

mixalistzikas commented 6 years ago

I was getting the following error

ERROR in ./node_modules/angular2-notifications/src/simple-notifications/components/simple-notifications.component.ngfactory.ts
Module build failed: Error: /home/michalis/Documents/Boxes/18-24.mean/app/node_modules/angular2-notifications/src/simple-notifications/components/simple-notifications.component.ngfactory.ts is not part of the compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
at AngularCompilerPlugin.getCompiledFile (/home/michalis/Documents/Boxes/18-24.mean/app/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:624:23)
at plugin.done.then (/home/michalis/Documents/Boxes/18-24.mean/app/node_modules/@ngtools/webpack/src/loader.js:467:39)
at <anonymous>
 @ ./src/app/app.component.ngfactory.js 12:0-141
 @ ./src/app/app.module.ngfactory.js
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts

and I solve it by simple put this to the node_modules generated package.json file

"typings": "./dist/index.d.ts",
TerryMooreII commented 6 years ago

This issue is fixed in PR: https://github.com/flauc/angular2-notifications/pull/261 (Add link reference for the next person looking for info about this issue.)

mixalistzikas commented 6 years ago

I get the last version but the package.json inside the node_modules is the following

{ "_from": "angular2-notifications@^0.7.8", "_id": "angular2-notifications@0.7.8", "_inBundle": false, "_integrity": "sha1-7Ly5Wo0tQCr5SpoIDWZkxw0zoCk=", "_location": "/angular2-notifications", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, "raw": "angular2-notifications@^0.7.8", "name": "angular2-notifications", "escapedName": "angular2-notifications", "rawSpec": "^0.7.8", "saveSpec": null, "fetchSpec": "^0.7.8" }, "_requiredBy": [ "/" ], "_resolved": "https://registry.npmjs.org/angular2-notifications/-/angular2-notifications-0.7.8.tgz", "_shasum": "ecbcb95a8d2d402af94a9a080d6664c70d33a029", "_spec": "angular2-notifications@^0.7.8", "_where": "/home/michalis/Documents/Boxes/18-24.mean/app", "author": { "name": "Filip Lauc", "email": "filip.lauc93@gmail.com" }, "bugs": { "url": "https://github.com/flauc/angular2-notifications/issues" }, "bundleDependencies": false, "deprecated": false, "description": "An easy to use notification library for angular 2", "devDependencies": { "@angular/animations": "^4.0.0", "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/compiler-cli": "^4.0.0", "@angular/core": "^4.0.0", "@angular/platform-browser": "^4.0.0", "@angular/platform-browser-dynamic": "^4.0.0", "@types/jasmine": "2.5.38", "@types/node": "~6.0.60", "awesome-typescript-loader": "^3.2.1", "codelyzer": "~2.0.0", "core-js": "^2.4.1", "istanbul-instrumenter-loader": "^2.0.0", "jasmine-core": "~2.5.2", "jasmine-spec-reporter": "~3.2.0", "karma": "~1.4.1", "karma-chrome-launcher": "~2.0.0", "karma-cli": "~1.0.1", "karma-coverage": "^1.1.1", "karma-coverage-istanbul-reporter": "^0.2.0", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "karma-mocha-reporter": "^2.2.3", "karma-remap-coverage": "^0.1.4", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^2.0.4", "ng-packagr": "^1.1.0", "protractor": "~5.1.0", "rxjs": "^5.1.0", "source-map-loader": "^0.2.1", "ts-helpers": "^1.1.2", "ts-node": "~2.0.0", "tslint": "~4.5.0", "typescript": "~2.2.0", "webpack": "2.6.1", "zone.js": "^0.8.4" }, "engines": { "node": ">=6.0.0" }, "homepage": "https://github.com/flauc/angular2-notifications", "keywords": [ "Angular", "Angular 2", "Library", "Notifications", "Notification", "Toast" ], "license": "MIT", "main": "./dist/index.js", "name": "angular2-notifications", "peerDependencies": { "@angular/animations": "^4.0.0", "@angular/common": "^4.0.0", "@angular/core": "^4.0.0", "@angular/platform-browser": "^4.0.0" }, "repository": { "type": "git", "url": "git+https://github.com/flauc/angular2-notifications.git" }, "scripts": { "build": "ngc -p tsconfig.json", "lint": "npm run tslint \"src/**/*.ts\"", "packagr": "ng-packagr -p ng-package.json", "test": "npm run lint && karma start", "tsc": "tsc", "tslint": "tslint" }, "version": "0.7.8" }

TerryMooreII commented 6 years ago

@mixalistzikas The latest version in NPM (version 0.7.8) doesnt have fix. @flauc says he will push an update this weekend.

mixalistzikas commented 6 years ago

My bad... Thank you...

flauc commented 6 years ago

The library now works with Angular 5. I've tested this in @angular/cli please let me know if you are finding some problems with it in different setups.

Thank you for your patience 👍

mixalistzikas commented 6 years ago

Perfect... Thank you very much for your quick response... Works perfect now

amihailes commented 6 years ago

Hello,

Just tested with the new version. Perfect for NG5.

Thanks.

alejuanito commented 6 years ago

I change version from angular 4 to 5.2 but when run npm build --prod the library not work.

ERROR in ./node_modules/angular2-notifications/src/simple-notifications/components/simple-notifications.component.ngfactory.ts
Module build failed: Error: ..\ventas-client-v2\ventas-client-v2\ventas-client\node_modules\angular2-notifications\src\simple-notifications\components\simple-notifications.component.ngfactory.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
    at AngularCompilerPlugin.getCompiledFile (D:\Alejandro\Repositoriodeproyectos\repo-venta\ventas-client-v2\ventas-client-v2\ventas-client\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:674:23)
    at plugin.done.then (..\ventas-client-v2\ventas-client-v2\ventas-client\node_modules\@ngtools\webpack\src\loader.js:467:39)
"dependencies": {
    "@angular-devkit/schematics": "0.0.45",
    "@angular/animations": "^5.2.9",
    "@angular/common": "^5.2.9",
    "@angular/compiler": "^5.2.9",
    "@angular/core": "^5.2.9",
    "@angular/forms": "^5.2.9",
    "@angular/http": "^5.2.9",
    "@angular/platform-browser": "^5.2.9",
    "@angular/platform-browser-dynamic": "^5.2.9",
    "@angular/platform-server": "^5.2.9",
    "@angular/router": "^5.2.9",
    "angular-tree-component": "^6.1.0",
    "angular2-multiselect-dropdown": "^1.3.4",
    "angular2-notifications": "^0.7.8",
    "core-js": "^2.5.0",
    "ng2-bs3-modal": "^0.10.4",
    "ng2-charts": "^1.6.0",
    "ng2-completer": "^1.6.0",
    "ng2-datepicker": "^1.8.3",
    "ng2-datepicker-bootstrap": "^1.0.0",
    "ng2-file-upload": "^1.3.0",
    "ng2-sweetalert2": "0.0.8",
    "ng2-validation": "^4.2.0",
    "ngx-mydatepicker": "^2.1.3",
    "rxjs": "^5.5.7",
    "underscore": "^1.8.3",
    "zone.js": "^0.8.16"
  },
  "devDependencies": {
    "@angular/cli": "^1.7.3",
    "@angular/compiler-cli": "^5.2.9",
    "@types/jasmine": "2.5.38",
    "@types/moment": "^2.13.0",
    "@types/node": "~6.0.60",
    "@types/underscore": "^1.8.1",
    "codelyzer": "~2.0.0",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.0",
    "ts-node": "~2.0.0",
    "tslint": "~4.5.0",
    "typescript": "^2.4.2",
    "uglify-js": "git://github.com/mishoo/UglifyJS2#harmony-v2.8.22"
  }

I resolve the problem with "typings": "./dist/index.d.ts" but when re install the npm package the error return.

NodiraIbrogimova commented 6 years ago

Hi, I'm having the error

@angular/animations@5.2.9 requires a peer of @angular/core@5.2.9 but none is installed. You must install peer dependencies yourself.

How can I fix this error? Thank you in advance

launcelot66 commented 6 years ago

@NodiraIbrogimova look in your package.json:

"dependencies": { ..., "@angular/core": "^5.2.9", ,,,}

NodiraIbrogimova commented 6 years ago

Thank you I fixed the error :) Btw, it was showing "dependencies": { ..., "": "^5.2.9", ,,,}

manar-mk commented 6 years ago

Hi there. Still getting this error while build

ERROR in ./node_modules/angular2-notifications/src/simple-notifications/components/simple-notifications.component.ngfactory.ts
Module build failed: Error: C:\projects\mysky-webapp\node_modules\angular2-notifications\src\simple-notifications\components\simple-notifications.component.ngfactory.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
    at AngularCompilerPlugin.getCompiledFile (C:\projects\mysky-webapp\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:677:23)
    at plugin.done.then (C:\projects\mysky-webapp\node_modules\@ngtools\webpack\src\loader.js:467:39)
    at <anonymous>