akmittal / angular2-datepicker

Angular2 date time picker
https://www.npmjs.com/package/angular2-datepicker
9 stars 17 forks source link

Project fails to build #8

Open jasperSpeicher opened 7 years ago

jasperSpeicher commented 7 years ago

OSX Node 8.1.4 after clone and npm install



> angular2-datepicker@1.0.4 start /Users/jjs/tmp/angular2-datepicker
> webpack-dev-server --config webpack.js --progress

Live Reload listening on port 35729

 70% 2/2 build modules http://localhost:5000/webpack-dev-server/
webpack result is served from /
content is served from ./src
404s will fallback to /index.html
 65% 12/13 build modulests-loader: Using typescript@2.0.10 and /Users/jjs/tmp/angular2-datepicker/tsconfig.json
Time: 7697ms                
                                 Asset     Size  Chunks             Chunk Names
  f4769f9bdb7466be65088239c12046d1.eot  20.1 kB          [emitted]  
  89889688147bd7575d6327160d64e760.svg   109 kB          [emitted]  
  e18bbf611f2a2e43afc071aa2f4e1512.ttf  45.4 kB          [emitted]  
 fa2772327f55d8198301fdb8bcfc8158.woff  23.4 kB          [emitted]  
448c34a56d699c29117adc64c43affeb.woff2    18 kB          [emitted]  
                             vendor.js  3.43 MB       0  [emitted]  vendor
                                app.js   437 kB       1  [emitted]  app
                         vendor.js.map  4.07 MB       0  [emitted]  vendor
                            app.js.map   553 kB       1  [emitted]  app
                            index.html  1.29 kB          [emitted]  
chunk    {0} vendor.js, vendor.js.map (vendor) 3.32 MB [rendered]
chunk    {1} app.js, app.js.map (app) 418 kB {0} [rendered]

ERROR in /Users/jjs/tmp/angular2-datepicker/node_modules/@types/es6-shim/index.d.ts
(596,29): error TS2304: Cannot find name 'object'.

ERROR in /Users/jjs/tmp/angular2-datepicker/node_modules/@types/es6-shim/index.d.ts
(604,20): error TS2304: Cannot find name 'object'.

ERROR in /Users/jjs/tmp/angular2-datepicker/node_modules/@types/es6-shim/index.d.ts
(605,20): error TS2304: Cannot find name 'object'.

ERROR in /Users/jjs/tmp/angular2-datepicker/node_modules/@angular/compiler/src/runtime_compiler.d.ts
(26,22): error TS2420: Class 'RuntimeCompiler' incorrectly implements interface 'Compiler'.
  Property 'getNgContentSelectors' is missing in type 'RuntimeCompiler'.

ERROR in /Users/jjs/tmp/angular2-datepicker/node_modules/@angular/compiler/src/private_import_core.d.ts
(17,43): error TS2339: Property '_AppElement' does not exist on type '{ isDefaultChangeDetectionStrategy: (changeDetectionStrategy: ChangeDetectionStrategy) => boolean...'.

ERROR in /Users/jjs/tmp/angular2-datepicker/node_modules/@angular/compiler/src/private_import_core.d.ts
(18,43): error TS2339: Property 'AppElement' does not exist on type '{ isDefaultChangeDetectionStrategy: (changeDetectionStrategy: ChangeDetectionStrategy) => boolean...'.
Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  3.12 kB       0       
    chunk    {0} index.html 1.2 kB [rendered]
webpack: Failed to compile.```
chrispinzaru commented 6 years ago

Hello, I managed to fix this issue, which is incorrect package versions. So, to fix this I changed next things in package json: [dependencies]: "@ angular/common": "^2.3.1", "@ angular/compiler": "^2.3.1", "@ angular/core": "^2.3.1", "@ angular/forms": "^2.3.1", "@ angular/platform-browser": "^2.3.1", "@ angular/platform-browser-dynamic": "^2.3.1", ... "es6-shim": "~0.35.2", ... "rxjs": "5.0.0-rc.4", "zone.js": "^0.7.2" [devDependencies]: "typescript": "~2.2.x"

1) The first problem was that es6-shim was wrote in Typescript 2.2, so I changed Typescript dependency from 2.0 to 2.2 in package.json 2) Next problem came from "RuntimeCompiler type missing" which appeared after my upgrading to typescript 2.2. To fix this I upgraded the Angular to 2.3.1 and rxjs/zone.js/. Also, thought to be a good idead to change es6-shim from 0.35.1 to 0.35.2, yet I don't think this is required.

I think I'll make a merge request, please let me know.