NativeScript / nativescript-background-http

Background Upload plugin for the NativeScript framework
Apache License 2.0
102 stars 50 forks source link

Error in Angular application #105

Closed tuckerjt07 closed 6 years ago

tuckerjt07 commented 6 years ago

Following the angular example code whenever I include the this.newsession = session('image-upload'); line I get the following error

System.err: TypeError: Cannot read property 'extend' of undefined
System.err: File: "<unknown>, line: 1, column: 265
System.err: 
System.err: StackTrace: 
System.err:     Frame: function:'', file:'file:///data/data/org.nativescript.HawkR/files/app/tns_modules/nativescript-background-http/background-http.js', line: 7, column: 78
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/org.nativescript.HawkR/files/app/pages/conversation/conversation.component.js', line: 6, column: 38
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/org.nativescript.HawkR/files/app/app.routing.js', line: 6, column: 32
tsonevn commented 6 years ago

Hi @tuckerjt07, I tested your case in the sample project, however, was unable to recreate similar issue nativescript-background-http plugin. For your convenience, I am attaching a sample project. Please review it and make the needed changes, which will allow us to recreate this scenario.

Also provide more info about your environment(CLI, modules, runtime versions). Archive.zip

lini commented 6 years ago

This error indicates that the plugin was not installed correctly. Removing the platforms directory and rebuilding your app should fix it. See #96 for reference.

tuckerjt07 commented 6 years ago

Thanks @lini that seemed to have done the trick.