Riron / ionic-img-viewer

Ionic 2+ component providing a Twitter inspired experience to visualize pictures.
MIT License
283 stars 118 forks source link

Production build failing #91

Closed FallenRiteMonk closed 7 years ago

FallenRiteMonk commented 7 years ago

Please provide you version information :

Dependency Version
ionic2 3.12.0
ionic-angular 3.7.1
ionic/app-scripts 3.0.0
angular 4.4.3
ionic-img-viewer 2.7.0

Have you checked...

Running a production build ionic build --prod crashed due to following error:

Error: ./node_modules/rxjs/observable/BoundNodeCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
    at Object.getEffectiveTypeAnnotationNode (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:9341:17)
    at assignContextualParameterTypes (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:41652:25)
    at checkFunctionExpressionOrObjectLiteralMethod (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:41948:29)
    at checkExpressionWorker (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:42959:28)
    at checkExpression (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:42898:42)
    at checkExpressionCached (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:42779:38)
    at checkReturnStatement (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:45418:54)
    at checkSourceElement (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:46763:28)
    at Object.forEach (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:1506:30)
    at checkBlock (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:44563:16)
 @ ./node_modules/rxjs/observable/bindNodeCallback.js 2:36-76
 @ ./node_modules/rxjs/add/observable/bindNodeCallback.js
 @ ./node_modules/rxjs/Rx.js
 @ ./node_modules/ionic-img-viewer/dist/es2015/src/image-viewer-impl.js
 @ ./node_modules/ionic-img-viewer/dist/es2015/src/image-viewer.js
 @ ./node_modules/ionic-img-viewer/dist/es2015/src/image-viewer.controller.js
 @ ./src/app/app.module.ngfactory.ts
 @ ./src/app/main.ts,./node_modules/rxjs/observable/BoundCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
    at Object.getEffectiveTypeAnnotationNode (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:9341:17)
    at assignContextualParameterTypes (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:41652:25)
    at checkFunctionExpressionOrObjectLiteralMethod (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:41948:29)
    at checkExpressionWorker (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:42959:28)
    at checkExpression (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:42898:42)
    at checkExpressionCached (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:42779:38)
    at checkReturnStatement (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:45418:54)
    at checkSourceElement (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:46763:28)
    at Object.forEach (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:1506:30)
    at checkBlock (<PROJECT_PATH>/node_modules/typescript/lib/typescript.js:44563:16)
 @ ./node_modules/rxjs/observable/bindCallback.js 2:32-68
 @ ./node_modules/rxjs/add/observable/bindCallback.js
 @ ./node_modules/rxjs/Rx.js
 @ ./node_modules/ionic-img-viewer/dist/es2015/src/image-viewer-impl.js
 @ ./node_modules/ionic-img-viewer/dist/es2015/src/image-viewer.js
 @ ./node_modules/ionic-img-viewer/dist/es2015/src/image-viewer.controller.js
 @ ./src/app/app.module.ngfactory.ts
 @ ./src/app/main.ts
    at BuildError.Error (native)
    at new BuildError (<PROJECT_PATH>/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at callback (<PROJECT_PATH>/node_modules/@ionic/app-scripts/dist/webpack.js:123:28)
    at emitRecords.err (<PROJECT_PATH>/node_modules/webpack/lib/Compiler.js:269:13)
    at Compiler.emitRecords (<PROJECT_PATH>/node_modules/webpack/lib/Compiler.js:375:38)
    at emitAssets.err (<PROJECT_PATH>/node_modules/webpack/lib/Compiler.js:262:10)
    at applyPluginsAsyncSeries1.err (<PROJECT_PATH>/node_modules/webpack/lib/Compiler.js:368:12)
    at next (<PROJECT_PATH>/node_modules/tapable/lib/Tapable.js:218:11)
    at Compiler.compiler.plugin (<PROJECT_PATH>/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
    at Compiler.applyPluginsAsyncSeries1 (<PROJECT_PATH>/node_modules/tapable/lib/Tapable.js:222:13)
pe1o2pl commented 7 years ago

The same, --debug mode works fine but --prod doesn't

@ionic/app-scripts : 3.0.0 Cordova Platforms : android 6.2.3 Ionic Framework : ionic-angular 3.7.1 ionic-img-viewer": "^2.7.0 ionic-angular": "3.7.1

Riron commented 7 years ago

I just released version 2.7.2 that should fix the problem. Please upgrade and try again. Thanks !

FallenRiteMonk commented 7 years ago

@Riron thanks, I'll give it a try as soon as possible and let you know!

FallenRiteMonk commented 7 years ago

Works great thanks!

pe1o2pl commented 7 years ago

I have upgraded to the latest version 2.7.2 and still the same, doesn't work --prod (--debug works).

Dependency      |Version
----------------|-------
ionic2          | 3.13
angular         | 4.4.3
ionic-img-viewer| 2.7.2
Riron commented 7 years ago

ionic2 | 3.13 ? And what's your error ? The error mentioned by @FallenRiteMonk has been fixed, he just confirmed it 👍

pe1o2pl commented 7 years ago

Hi Riron, it works great on the browser and on the device with --debug option, however when run --prod it doesn't work, nothing happens after pressing image. There is no error as well when I remote debugging.

@ionic/cli-utils  : 1.13.0
ionic (Ionic CLI) : 3.13.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 3.0.0
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.7.1

System:

Android SDK Tools : 25.2.5
Node              : v6.9.2
npm               : 5.3.0
OS                : Windows 7
Riron commented 7 years ago

Oh okay ! It's not the same bug then, it's the same as https://github.com/Riron/ionic-img-viewer/issues/90 I just released a new version that should fix that a few hours ago.

pe1o2pl commented 7 years ago

Yeah, now works fine, cheers