RE: Suspect rxjs@6.2.0 issue

plugins

#1

Hi,

I use the command to create a blank ng template as follow
tns create my-blank-ng --template tns-template-blank-ng.

After then, I delete package-lock.json and replace package.json with the following setting
{
“name”: “ema”,
“description”: “Employer Maid Agency”,
“license”: "SEE LICENSE IN ",
“readme”: “NativeScript Application”,
“repository”: “”,
“nativescript”: {
“id”: “org.nativescript.ema”,
“tns-android”: {
“version”: “4.0.1”
}
},
“dependencies”: {
@angular/animations”: “^6.0.3”,
@angular/common”: “^6.0.3”,
@angular/compiler”: “^6.0.3”,
@angular/core”: “^6.0.3”,
@angular/http”: “^6.0.3”,
@angular/platform-browser”: “^6.0.3”,
@angular/platform-browser-dynamic”: “^6.0.3”,
@angular/router”: “^6.0.3”,
@ngrx/effects”: “^6.0.1”,
@ngrx/store”: “^6.0.1”,
@types/ramda”: “^0.25.30”,
“nativescript-angular”: “^6.0.0”,
“nativescript-background-http”: “^3.2.7”,
“nativescript-camera”: “^4.0.2”,
“nativescript-fancyalert”: “^1.2.0”,
“nativescript-feedback”: “^1.1.2”,
“nativescript-loading-indicator”: “^2.4.0”,
“nativescript-ngx-fonticon”: “^4.2.0”,
“nativescript-snackbar”: “^3.1.0”,
“nativescript-theme-core”: “^1.0.4”,
“ramda”: “^0.25.0”,
“reflect-metadata”: “~0.1.10”,
“rxjs”: “^6.2.0”,
“rxjs-compat”: “^6.2.0”,
“tns-core-modules”: “^4.1.0”,
“zone.js”: “~0.8.18”
},
“devDependencies”: {
@angular-devkit/core”: “~0.6.3”,
@angular/compiler-cli”: “^6.0.3”,
@ngtools/webpack”: “^6.0.5”,
“babel-traverse”: “^6.26.0”,
“babel-types”: “^6.26.0”,
“babylon”: “^6.18.0”,
“clean-webpack-plugin”: “~0.1.19”,
“copy-webpack-plugin”: “^4.5.1”,
“css-loader”: “^0.28.11”,
“extract-text-webpack-plugin”: “^3.0.2”,
“lazy”: “^1.0.11”,
“nativescript-dev-sass”: “^1.6.0”,
“nativescript-dev-typescript”: “^0.7.1”,
“nativescript-dev-webpack”: “^0.12.0”,
“nativescript-worker-loader”: “^0.9.0”,
“raw-loader”: “^0.5.1”,
“resolve-url-loader”: “^2.3.0”,
“sass-loader”: “^7.0.1”,
“typescript”: “^2.8.3”,
“uglifyjs-webpack-plugin”: “^1.2.5”,
“webpack”: “^4.9.1”,
“webpack-bundle-analyzer”: “^2.13.1”,
“webpack-cli”: “~2.1.3”,
“webpack-sources”: “^1.1.0”
}
}

When I run tns build android, the package is built successfully.

However, when I run tns run android --emulator, the error is displayed as follow.My suspect is that the erorr is caused by “file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/rxjs/operators/audit.js’, line: 6, column: 10”, but I can’t figure how to solve it. Need your help to guide me on how can I resolve it.

C:\tns\testema>tns run android --emulator
Searching for devices…
Starting Android emulator with image a
Waiting for emulator device initialization…
Executing before-liveSync hook from C:\tns\testema\hooks\before-liveSync\nativescript-angular-sync.js
Executing before-shouldPrepare hook from C:\tns\testema\hooks\before-shouldPrepare\nativescript-dev-webpack.js
Skipping prepare.
Installing…
Successfully installed on device with identifier ‘emulator-5554’.
Successfully transferred all files.
Refreshing application…
Successfully synced application org.nativescript.ema on device emulator-5554.
Executing before-watchPatterns hook from C:\tns\testema\hooks\before-watchPatterns\nativescript-dev-sass.js
Executing before-watchPatterns hook from C:\tns\testema\hooks\before-watchPatterns\nativescript-dev-typescript.js
Executing before-watchPatterns hook from C:\tns\testema\hooks\before-watchPatterns\nativescript-dev-webpack.js
Executing before-watch hook from C:\tns\testema\hooks\before-watch\nativescript-dev-sass.js
Found peer node-sass
ActivityManager: Pre-boot of {com.android.providers.calendar/com.android.providers.calendar.CalendarUpgradeReceiver} for user 0

System.err: android.app.ActivityThread.main(ActivityThread.java:5417)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/rxjs/operators/audit.js’, line: 6, column: 10
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/rxjs/operators.js’, line: 2, column: 15
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:‘Object.setPrototypeOf.proto’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/@angular/core/bundles/core.umd.js’, line: 8, column: 99 System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/@angular/core/bundles/core.umd.js’, line: 11, column: 2
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/nativescript-angular/platform-common.js’, line: 11, column: 14
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/nativescript-angular/platform.js’, line: 2, column: 25
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/main.js’, line: 4, column: 18
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: “rxjs-compat/operators/audit”, relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:530)
System.err: com.tns.Runtime.run(Runtime.java:522)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
System.err: android.os.Handler.dispatchMessage(Handler.java:102)
System.err: android.os.Looper.loop(Looper.java:148)
System.err: android.app.ActivityThread.main(ActivityThread.java:5417)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/rxjs/operators/audit.js’, line: 6, column: 10
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/rxjs/operators.js’, line: 2, column: 15
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:‘Object.setPrototypeOf.proto’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/@angular/core/bundles/core.umd.js’, line: 8, column: 99
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/@angular/core/bundles/core.umd.js’, line: 11, column: 2
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/nativescript-angular/platform-common.js’, line: 11, column: 14
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/nativescript-angular/platform.js’, line: 2, column: 25
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/main.js’, line: 4, column: 18
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: “rxjs-compat/operators/audit”, relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:530)
System.err: com.tns.Runtime.run(Runtime.java:522)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707) System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
System.err: android.os.Handler.dispatchMessage(Handler.java:102)
System.err: android.os.Looper.loop(Looper.java:148)
System.err: android.app.ActivityThread.main(ActivityThread.java:5417)
System.err: java.lang.reflect.Method.invoke(Native Method) System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266 System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/rxjs/operators/audit.js’, line: 6, column: 10
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266 System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/rxjs/operators.js’, line: 2, column: 15
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:‘Object.setPrototypeOf.proto’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/@angular/core/bundles/core.umd.js’, line: 8, column: 99
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/@angular/core/bundles/core.umd.js’, line: 11, column: 2
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/nativescript-angular/platform-common.js’, line: 11, column: 14
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/nativescript-angular/platform.js’, line: 2, column: 25 System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/main.js’, line: 4, column: 18 System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: “rxjs-compat/operators/audit”, relative to: app/tns_modules/ System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55) System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:530)
System.err: com.tns.Runtime.run(Runtime.java:522)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
System.err: android.os.Handler.dispatchMessage(Handler.java:102)
System.err: android.os.Looper.loop(Looper.java:148)
System.err: android.app.ActivityThread.main(ActivityThread.java:5417)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/rxjs/operators/audit.js’, line: 6, column: 10
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/rxjs/operators.js’, line: 2, column: 15
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:‘Object.setPrototypeOf.proto’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/@angular/core/bundles/core.umd.js’, line: 8, column: 99
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/@angular/core/bundles/core.umd.js’, line: 11, column: 2
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266 System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/nativescript-angular/platform-common.js’, line: 11, column: 14 System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/nativescript-angular/platform.js’, line: 2, column: 25
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266 System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/main.js’, line: 4, column: 18
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: “rxjs-compat/operators/audit”, relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:530)
System.err: com.tns.Runtime.run(Runtime.java:522)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405) System.err: android.os.Handler.dispatchMessage(Handler.java:102)
System.err: android.os.Looper.loop(Looper.java:148) System.err: android.app.ActivityThread.main(ActivityThread.java:5417)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/rxjs/operators/audit.js’, line: 6, column: 10
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/rxjs/operators.js’, line: 2, column: 15
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:‘Object.setPrototypeOf.proto’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/@angular/core/bundles/core.umd.js’, line: 8, column: 99
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/@angular/core/bundles/core.umd.js’, line: 11, column: 2
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/nativescript-angular/platform-common.js’, line: 11, column: 14
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266 System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/tns_modules/nativescript-angular/platform.js’, line: 2, column: 25 System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.newema/files/app/main.js’, line: 4, column: 18 System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: “rxjs-compat/operators/audit”, relative to: app/tns_modules/
System.err: com.tns.Module.resolvePathHelper(Module.java:146)
System.err: com.tns.Module.resolvePath(Module.java:55)
System.err: com.tns.Runtime.runModule(Native Method)
System.err: com.tns.Runtime.runModule(Runtime.java:530)
System.err: com.tns.Runtime.run(Runtime.java:522)
System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
System.err: android.os.Handler.dispatchMessage(Handler.java:102)
System.err: android.os.Looper.loop(Looper.java:148)
System.err: android.app.ActivityThread.main(ActivityThread.java:5417)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Thanks for the help!


#2

Got the same problem.


#3

Follow the solution in this link Tns does not compile anymore; Found 0 errors. Watching for file changes

I set the typescript to be 2.7.2 and it works for me.


#4

Happy to help finding the solution before! :smiley: