vakrilov / ng2-redux-nativescript

4 stars 0 forks source link

build application failed #1

Open masteroren opened 7 years ago

masteroren commented 7 years ago

I clone the application but when I build for android it failed because it can't find ng2-redux. Any ideas why?

leocrawf commented 7 years ago

I have never tried this plugin but typically when I get this error I do the following:

  1. check that the plugin entry is written to the package.json file in root directory. You may have to remove the plugin and then add it back using the respective command(s).
  2. Check that the plugin folder is seen in the npm modules folder.
  3. Sometimes I may have to tns platform remove android/iOS then tns platform add android/iOS respectively.
  4. Do tns build android/ios respectively.

By doing those things I tend to solve the general issue of plugin folder cannot be found.

masteroren commented 7 years ago

it helped with the error but when running the application it failed to start

leocrawf commented 7 years ago

Are you still seeing the error that says ng2-redux cannot be found?

masteroren commented 7 years ago

No

but when doing tns run android --emulator you will be able to in the emulator stack code failur.

On 28/12/16 23:40, Leocrawf Stewart wrote:

Are you still seeing the error that says ng2-redux cannot be found?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vakrilov/ng2-redux-nativescript/issues/1#issuecomment-269545307, or mute the thread https://github.com/notifications/unsubscribe-auth/AH7MePm3Wdi32H_u2wqyK7DgghLFhXH8ks5rMtdMgaJpZM4LV7IV.

leocrawf commented 7 years ago

Can you show the error message here?

masteroren commented 7 years ago

give me 2 minutes to run it

On 28/12/16 23:43, Leocrawf Stewart wrote:

Can you show the error message here?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vakrilov/ng2-redux-nativescript/issues/1#issuecomment-269545762, or mute the thread https://github.com/notifications/unsubscribe-auth/AH7MeJLnbtd_OsDedgcsSRWE4G23DnBjks5rMtf7gaJpZM4LV7IV.

masteroren commented 7 years ago

I wasn't able to copy all from the emulator

An uncaught Exception occurred on "main" thread. java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException:

Error calling module function

Error calling module function

Error calling module function

Error calling module function

Error: com.tns.NativeScriptException: Failed to find module: "rxjs/Subject", relative to: app/tns_modules/ com.tns.Module.resolvePathHelper(Module.java:159) com.tns.Module.resolvePath(Module.java:60) com.tns.Runtime.runModule(Native Method) com.tns.Runtime.runModule(Runtime.java:514) com.tns.Runtime.run(Runtime.java:509) com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:17) android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013) android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707) android.app.ActivityThread.-wrap1(ActivityThread.java) android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405) andr

On 28/12/16 23:43, Leocrawf Stewart wrote:

Can you show the error message here?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vakrilov/ng2-redux-nativescript/issues/1#issuecomment-269545762, or mute the thread https://github.com/notifications/unsubscribe-auth/AH7MeJLnbtd_OsDedgcsSRWE4G23DnBjks5rMtf7gaJpZM4LV7IV.

leocrawf commented 7 years ago

Can you post your package.json file found in your root folder here?

leocrawf commented 7 years ago

If not it appears you are importing or requiring a module "rxjs/Subject" that does not exist. You can follow the steps above to resolve.

masteroren commented 7 years ago

Yes I notice that and add it

Now running android again

On 29/12/16 00:15, Leocrawf Stewart wrote:

If not it appears you are importing or requiring a module "rxjs/Subject" that does not exist. You can follow the steps above to resolve.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vakrilov/ng2-redux-nativescript/issues/1#issuecomment-269549756, or mute the thread https://github.com/notifications/unsubscribe-auth/AH7MeL2DUs3dlWerSUaBSTloB2_SKdYsks5rMt9vgaJpZM4LV7IV.

masteroren commented 7 years ago

Now getting this:

An uncaught Exception occurred on "main" thread. java.lang.RuntimeException: Unable to resume activity {org.nativescript.ngreduxnativescript/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreateView failed

TypeError: ctorParameters.map is not a function File: "/data/data/org.nativescript.ngreduxnativescript/files/app/tns_modules/@angular/core/bundles/core.umd.js, line: 1942, column: 48

StackTrace: Frame: function:'ReflectionCapabilities.parameters', file:'/data/data/org.nativescript.ngreduxnativescript/files/app/tns_modules/@angular/core/bundles/core.umd.js', line: 1942, column: 49 Frame: function:'Reflector.parameters', file:'/data/data/org.nativescript.ngreduxnativescript/files/app/tns_modules/@angular/core/bundles/core.umd.js', line: 2137, column: 48 Frame: function:'CompileMetadataResolver.getDependenciesMetadata', file:'/data/data/org.nativescript.ngreduxnativescript/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 14204, column: 56 Frame

On 29/12/16 00:15, Leocrawf Stewart wrote:

If not it appears you are importing or requiring a module "rxjs/Subject" that does not exist. You can follow the steps above to resolve.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vakrilov/ng2-redux-nativescript/issues/1#issuecomment-269549756, or mute the thread https://github.com/notifications/unsubscribe-auth/AH7MeL2DUs3dlWerSUaBSTloB2_SKdYsks5rMt9vgaJpZM4LV7IV.

leocrawf commented 7 years ago

Good to note that you are making some progress. As I had already stated I have never used this plugin but from the error above it appears you are calling a function that does not exist. What you have to check for is

  1. was the class/object/function imported/required properly.
  2. was is instantiated properly so that in can be seen in my class.