Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: crypto is not defined error with Native Script 5.0 with Angular 7 #4

Open
acharyaks90 opened this issue Jan 8, 2019 · 0 comments

Comments

@acharyaks90
Copy link

Hi
I have installed nativescript-angular-webview-crypto in Angular Project but
after Installation it shows
`
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
import { NativeScriptUISideDrawerModule } from "nativescript-ui-sidedrawer/angular";
import "nativescript-angular-webview-crypto";

import { AppRoutingModule } from "./app-routing.module";
import { AppComponent } from "./app.component";
console.log(crypto);
@NgModule({
bootstrap: [
AppComponent
],
imports: [
AppRoutingModule,
NativeScriptModule,
NativeScriptUISideDrawerModule
],
declarations: [
AppComponent
],
schemas: [
NO_ERRORS_SCHEMA
]
})
export class AppModule { }
`

System.err: ReferenceError: crypto is not defined
System.err: File: "file:///data/data/org.nativescript.sampleapp/files/app/app/app.module.js, line: 9, column: 12
System.err:
System.err: StackTrace:
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.sampleapp/files/app/app/app.module.js', line: 9, column: 13
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.sampleapp/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err:
System.err: ReferenceError: crypto is not defined
System.err: File: ", line: 1, column: 265
System.err:
System.err: StackTrace:
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.sampleapp/files/app/app/app.module.js', line: 9, column: 13
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.sampleapp/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err:
System.err: ReferenceError: crypto is not defined
System.err: File: ", line: 1, column: 265
System.err:
System.err: StackTrace:
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.sampleapp/files/app/app/app.module.js', line: 9, column: 13
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.sampleapp/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5406)
System.err: at android.app.ActivityThread.-wrap2(ActivityThread.java)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)
System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
System.err: at android.os.Looper.loop(Looper.java:154)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6119)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
System.err: Caused by: com.tns.NativeScriptException:
System.err:
System.err: Error calling module function
System.err:
System.err: Error calling module function
System.err:
System.err: ReferenceError: crypto is not defined
System.err: File: "file:///data/data/org.nativescript.sampleapp/files/app/app/app.module.js, line: 9, column: 12
System.err:
System.err: StackTrace:
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.sampleapp/files/app/app/app.module.js', line: 9, column: 13
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.sampleapp/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err:
System.err: ReferenceError: crypto is not defined
System.err: File: ", line: 1, column: 265
System.err:
System.err: StackTrace:
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.sampleapp/files/app/app/app.module.js', line: 9, column: 13
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.sampleapp/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err:
System.err: ReferenceError: crypto is not defined
System.err: File: ", line: 1, column: 265
System.err:
System.err: StackTrace:
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.sampleapp/files/app/app/app.module.js', line: 9, column: 13
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.sampleapp/files/app/main.js', line: 5, column: 20
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err: at com.tns.Runtime.runModule(Native Method)
System.err: at com.tns.Runtime.runModule(Runtime.java:553)
System.err: at com.tns.Runtime.run(Runtime.java:545)
System.err: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5403)
System.err: ... 8 more
Executing after-watch hook from D:\native-apps\sample-app\hooks\after-watch\nativescript-dev-sass.js
Executing after-watch hook from D:\native-apps\sample-app\hooks\after-watch\nativescript-dev-typescript.js
Stopping tsc watch
Executing after-watch hook from D:\native-apps\sample-app\hooks\after-watch\nativescript-dev-webpack.js
Stopping webpack watch
Executing after-watch hook from D:\native-apps\sample-app\hooks\after-watch\nativescript-dev-sass.js
Executing after-watch hook from D:\native-apps\sample-app\hooks\after-watch\nativescript-dev-typescript.js
Executing after-watch hook from D:\native-apps\sample-app\hooks\after-watch\nativescript-dev-webpack.js
Stopping webpack watch


Please check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant