moribvndvs / ng2-idle

Responding to idle users in Angular (not AngularJS) applications.
https://moribvndvs.github.io/ng2-idle
Apache License 2.0
322 stars 129 forks source link

Metadata issue with beta 13 #76

Open erikread opened 6 years ago

erikread commented 6 years ago

I'm submitting a ... (check one with "x")

[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/HackedByChinese/ng2-idle/blob/master/CONTRIBUTING.md#getting-help

Current behavior ng build --prod produces the following error when using @ng-idle/core 2.0.0-beta.13 Metadata version mismatch for module C:.../node_modules/@ng-idle/core/src/interruptargs.d.ts, found version 4, expected 3

Expected behavior

Beta 12 did not exhibit this behavior

Minimal reproduction of the problem with instructions

here is my top level npm package list: +-- angular-devkit/schematics@0.0.40 +-- angular/animations@4.4.6 +-- angular/cli@1.6.1 +-- angular/common@4.4.6 +-- angular/compiler@4.4.6 +-- angular/compiler-cli@4.4.6 +-- angular/core@4.4.6 +-- angular/forms@4.4.6 +-- angular/http@4.4.6 +-- angular/language-service@4.4.6 +-- angular/platform-browser@4.4.6 +-- angular/platform-browser-dynamic@4.4.6 +-- angular/router@4.4.6 +-- ng-idle/core@2.0.0-beta.13 +-- ng-idle/keepalive@2.0.0-beta.13 +-- types/jasmine@2.8.2 +-- types/jasminewd2@2.0.3 +-- types/node@6.0.94 +-- autoprefixer@6.7.7 +-- bootstrap@3.3.7 +-- bootstrap-tree@1.2.0 +-- chart.js@2.7.1 +-- circular-dependency-plugin@3.0.0 +-- classlist.js@1.1.20150312 +-- codelyzer@3.2.2 +-- core-js@2.5.3 +-- css-loader@0.26.4 +-- cssnano@3.10.0 +-- exports-loader@0.6.4 +-- file-loader@0.9.0 +-- font-awesome@4.7.0 +-- formvalidation@0.6.2-dev +-- html-webpack-plugin@2.30.1 +-- istanbul-instrumenter-loader@2.0.0 +-- jasmine-core@2.8.0 +-- jasmine-spec-reporter@4.2.1 +-- jquery@1.12.4 +-- jquery-match-height@0.7.2 +-- jquery-sparkline@2.4.0 +-- karma@1.7.1 +-- karma-chrome-launcher@2.2.0 +-- karma-cli@1.0.1 +-- karma-coverage-istanbul-reporter@1.3.0 +-- karma-jasmine@1.1.1 +-- karma-jasmine-html-reporter@0.2.2 +-- less-loader@4.0.5 +-- moment@2.20.0 +-- ngx-bootstrap@2.0.0-rc.0 +-- noty@2.4.1 +-- panzoom@3.0.0 +-- pdfmake-client@1.0.0 +-- postcss-loader@1.3.3 +-- postcss-url@5.1.2 +-- primeng@4.3.0 +-- protractor@5.2.2 +-- raw-loader@0.5.1 +-- reflect-metadata@0.1.10 +-- rxjs@5.5.5 +-- sass-loader@6.0.6 +-- script-loader@0.7.2 +-- source-map-loader@0.2.3 +-- style-loader@0.13.2 +-- stylus-loader@3.0.1 +-- ts-node@3.3.0 +-- tslint@5.8.0 +-- typescript@2.6.2 +-- url-loader@0.5.9 +-- web-animations-js@2.3.1 +-- webpack@3.10.0 +-- webpack-dev-server@2.9.7 `-- zone.js@0.8.18

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Windows 10 FCU, VS Core, NPM, Node

macw007 commented 6 years ago

I am having the same issues

macw007 commented 6 years ago

in the process of downgrading to a previous build hopefully that should fix my issue.

erikread commented 6 years ago

I did a little more research. Just the act of calling NgIdleKeepaliveModule.forRoot() in the module imports causes the issue. Backing up to beta 12 works for now.

asfo commented 6 years ago

I'm having this issue too in the recent versions.

Edit: I did the same as @cmorante and it worked...I had the same in the package.json .

einewton commented 6 years ago

I'm having this issue too.. This wasn't tested?

cmorante commented 6 years ago

unfortunately I had this same error duarnte one day without finding a solution but the strange thing is that my packages.json file had no references to beta 13, had dependencies to beta 12, then I thought that updating would be solved but it was a failure until today in the morning with fresh head just run: npm install @ng-idle/core@2.0.0-beta.12 npm install @ng-idle/keepalive@2.0.0-beta.12 and this could build my application again and mi packages.json have this lines: "@ng-idle/core": "^2.0.0-beta.12", "@ng-idle/keepalive": "^2.0.0-beta.12", "angular2-moment": "^1.7.0",

KudzieChase commented 6 years ago

I am having this issue in production but not in my local can't tell what I am doing wrong.. Okay I solved it by removing the "^" character within the packages.json i.e I changed "@ng-idle/core": "^2.0.0-beta.12" to "@ng-idle/core": "2.0.0-beta.12" ... It built just fine

PloughingAByteField commented 6 years ago

This looks to be an issue where a newer version of typescript was used to build beta-13 than the version you are using for your build. Personally I suspect the cause of this is the changes force by google on HttpClient for angular 5 support.

einewton commented 6 years ago

In order for me to get this to work, I had to upgrade to angular 5.1.2

kaedwen commented 6 years ago

This breaks ng2-idle for using with angular 4.x.x I have already published Applications stuck at angular 4 with a broken build process 👎