question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'equals' of undefined on core\ui\styling\style-properties.js:

See original GitHub issue

System.err: TypeError: Cannot read property ‘equals’ of undefined System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5743) System.err: at android.app.ActivityThread.-wrap1(Unknown Source:0) System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656) System.err: at android.os.Handler.dispatchMessage(Handler.java:106) System.err: at android.os.Looper.loop(Looper.java:164) System.err: at android.app.ActivityThread.main(ActivityThread.java:6494) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) System.err: Caused by: com.tns.NativeScriptException: Error calling module function System.err: TypeError: Cannot read property ‘equals’ of undefined System.err: File: (file: node_modules@nativescript\core\ui\styling\style-properties.js:613:5)

Environment I`m running NativeScript on Windows 10 Pro 64bits, the ns info:

√ Getting NativeScript components versions information… √ Component nativescript has 6.5.0 version and is up to date. √ Component tns-core-modules has 6.5.1 version and is up to date. ‼ Update available for component tns-android. Your current version is 6.3.1 and the latest available version is 6.5.0. ‼ Update available for component tns-ios. Your current version is 6.3.0 and the latest available version is 6.5.0.

Describe the bug I run “tns debug android --emulator --env.sourceMap --env.uglify --env.envtype=dev” and after the message bellow the error described popup

Searching for devices... Preparing project... File change detected. Starting incremental webpack compilation... webpack is watching the files…

To Reproduce

`rm -rf node_modules/ platforms/ sourceMap/ package-lock.json hooks && npm i && tns install

tns debug android --emulator --env.sourceMap --env.uglify --env.envtype=dev`

Expected behavior

Additional context

Webpack compilation complete. Watching for file changes. Webpack build done! nativescript-plugin-firebase: building for same environment, not forcing prepare. Project successfully prepared (android) Configure firebase Copy D:\intellective\marvel\mywork-mobile-app\App_Resources\Android\google-services.json to D:\intellective\marvel\mywork-mobile-app\platforms\android\app\google-services.json. Successfully transferred runtime.js on device emulator-5554. Restarting application on device emulator-5554… System.err: An uncaught Exception occurred on “main” thread. System.err: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function System.err: TypeError: Cannot read property ‘equals’ of undefined System.err: File: (file: node_modules@nativescript\core\ui\styling\style-properties.js:613:5) System.err: System.err: StackTrace: System.err: …/node_modules/@nativescript/core/ui/styling/style-properties.js(file: node_modules@nativescript\core\ui\styling\style-properties.js:613:5) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at …/node_modules/@nativescript/core/ui/core/view-base/view-base.js(file: node_modules@nativescript\core\ui\core\view-base\view-base.js:14:25) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at …/node_modules/@nativescript/core/ui/core/view/view-common.js(file: node_modules@nativescript\core\ui\core\view\view-common.js:5:18) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file: node_modules@nativescript\core\ui\core\view\view.android.js:5:20) System.err: at …/node_modules/@nativescript/core/ui/core/view/view.js(file: node_modules@nativescript\core\ui\core\view\view.android.js:953:21) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at …/node_modules/@nativescript/core/ui/frame/frame-common.js(file: node_modules@nativescript\core\ui\frame\frame-common.js:6:13) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file: node_modules@nativescript\core\ui\frame\frame.android.js:6:21) System.err: at …/node_modules/@nativescript/core/ui/frame/frame.js(file: node_modules@nativescript\core\ui\frame\frame.android.js:1085:0) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at …/node_modules/@nativescript/angular/platform-providers.js(file: node_modules@nativescript\angular\platform-providers.js:3:14) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file: node_modules@nativescript\angular\platform-common.js:15:27) System.err: at …/node_modules/@nativescript/angular/platform-common.js(file: node_modules@nativescript\angular\platform-common.js:322:0) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file: node_modules@nativescript\angular\platform.js:6:24) System.err: at …/node_modules/@nativescript/angular/platform.js(file: node_modules@nativescript\angular\platform.js:44:0) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file:///data/data/co.intellective.apps.marvel/files/app/bundle.js:1819:27) System.err: at ./main.ts(file:///data/data/co.intellective.apps.marvel/files/app/bundle.js:1838:108) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:43:0) System.err: at r(file: src\webpack\bootstrap:30:0) System.err: at (file: src$_lazy_route_resource lazy namespace object:4:0) System.err: at require(:1:266) System.err: System.err: System.err: TypeError: Cannot read property ‘equals’ of undefined System.err: System.err: StackTrace: System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function System.err: TypeError: Cannot read property ‘equals’ of undefined System.err: File: (file: node_modules@nativescript\core\ui\styling\style-properties.js:613:5) System.err: System.err: StackTrace: System.err: …/node_modules/@nativescript/core/ui/styling/style-properties.js(file: node_modules@nativescript\core\ui\styling\style-properties.js:613:5) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at …/node_modules/@nativescript/core/ui/core/view-base/view-base.js(file: node_modules@nativescript\core\ui\core\view-base\view-base.js:14:25) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at …/node_modules/@nativescript/core/ui/core/view/view-common.js(file: node_modules@nativescript\core\ui\core\view\view-common.js:5:18) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file: node_modules@nativescript\core\ui\core\view\view.android.js:5:20) System.err: at …/node_modules/@nativescript/core/ui/core/view/view.js(file: node_modules@nativescript\core\ui\core\view\view.android.js:953:21) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at …/node_modules/@nativescript/core/ui/frame/frame-common.js(file: node_modules@nativescript\core\ui\frame\frame-common.js:6:13) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file: node_modules@nativescript\core\ui\frame\frame.android.js:6:21) System.err: at …/node_modules/@nativescript/core/ui/frame/frame.js(file: node_modules@nativescript\core\ui\frame\frame.android.js:1085:0) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at …/node_modules/@nativescript/angular/platform-providers.js(file: node_modules@nativescript\angular\platform-providers.js:3:14) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file: node_modules@nativescript\angular\platform-common.js:15:27) System.err: at …/node_modules/@nativescript/angular/platform-common.js(file: node_modules@nativescript\angular\platform-common.js:322:0) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file: node_modules@nativescript\angular\platform.js:6:24) System.err: at …/node_modules/@nativescript/angular/platform.js(file: node_modules@nativescript\angular\platform.js:44:0) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file:///data/data/co.intellective.apps.marvel/files/app/bundle.js:1819:27) System.err: at ./main.ts(file:///data/data/co.intellective.apps.marvel/files/app/bundle.js:1838:108) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:43:0) System.err: at r(file: src\webpack\bootstrap:30:0) System.err: at (file: src$_lazy_route_resource lazy namespace object:4:0) System.err: at require(:1:266) System.err: System.err: System.err: TypeError: Cannot read property ‘equals’ of undefined System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5743) System.err: at android.app.ActivityThread.-wrap1(Unknown Source:0) System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656) System.err: at android.os.Handler.dispatchMessage(Handler.java:106) System.err: at android.os.Looper.loop(Looper.java:164) System.err: at android.app.ActivityThread.main(ActivityThread.java:6494) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) System.err: Caused by: com.tns.NativeScriptException: Error calling module function System.err: TypeError: Cannot read property ‘equals’ of undefined System.err: File: (file: node_modules@nativescript\core\ui\styling\style-properties.js:613:5) System.err: System.err: StackTrace: System.err: …/node_modules/@nativescript/core/ui/styling/style-properties.js(file: node_modules@nativescript\core\ui\styling\style-properties.js:613:5) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at …/node_modules/@nativescript/core/ui/core/view-base/view-base.js(file: node_modules@nativescript\core\ui\core\view-base\view-base.js:14:25) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at …/node_modules/@nativescript/core/ui/core/view/view-common.js(file: node_modules@nativescript\core\ui\core\view\view-common.js:5:18) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file: node_modules@nativescript\core\ui\core\view\view.android.js:5:20) System.err: at …/node_modules/@nativescript/core/ui/core/view/view.js(file: node_modules@nativescript\core\ui\core\view\view.android.js:953:21) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at …/node_modules/@nativescript/core/ui/frame/frame-common.js(file: node_modules@nativescript\core\ui\frame\frame-common.js:6:13) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file: node_modules@nativescript\core\ui\frame\frame.android.js:6:21) System.err: at …/node_modules/@nativescript/core/ui/frame/frame.js(file: node_modules@nativescript\core\ui\frame\frame.android.js:1085:0) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at …/node_modules/@nativescript/angular/platform-providers.js(file: node_modules@nativescript\angular\platform-providers.js:3:14) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file: node_modules@nativescript\angular\platform-common.js:15:27) System.err: at …/node_modules/@nativescript/angular/platform-common.js(file: node_modules@nativescript\angular\platform-common.js:322:0) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file: node_modules@nativescript\angular\platform.js:6:24) System.err: at …/node_modules/@nativescript/angular/platform.js(file: node_modules@nativescript\angular\platform.js:44:0) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:120:0) System.err: at (file:///data/data/co.intellective.apps.marvel/files/app/bundle.js:1819:27) System.err: at ./main.ts(file:///data/data/co.intellective.apps.marvel/files/app/bundle.js:1838:108) System.err: at k(file: src\webpack\bootstrap:750:0) System.err: at n(file: src\webpack\bootstrap:43:0) System.err: at r(file: src\webpack\bootstrap:30:0) System.err: at (file: src$_lazy_route_resource lazy namespace object:4:0) System.err: at require(:1:266) System.err: System.err: System.err: TypeError: Cannot read property ‘equals’ of undefined System.err: at com.tns.Runtime.runModule(Native Method) System.err: at com.tns.Runtime.runModule(Runtime.java:674) System.err: at com.tns.Runtime.run(Runtime.java:666) System.err: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21) System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119) System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740) System.err: … 8 more

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
crowmagnumbcommented, May 25, 2020

My problem ended up being a path entry in my tsconfig.json file. I had …

        "paths": {
            "~/*": [
                "src/*"
            ],
            "*": [
                "./node_modules/*"
            ]
        }

… and if I remove the node_modules one it works, my working tsconfig.json file has paths …

        "paths": {
            "~/*": ["src/*"]
        }
0reactions
crowmagnumbcommented, Apr 28, 2021

@limyandi Well, I don’t really know. If I remember right I was comparing my test repo to others I knew about and trying every little difference I saw and came upon this fix that way. And since that paths entry did not seem to negatively affect anything (for me) I just made the change and moved on. Sorry I can’t be of more help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Error Cannot read property 'equals' of undefined
Cannot read property 'equals' of undefined means that the Javascript interpreter is trying to access the property equals inside a variable ...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Cannot read property 'equals' of null when trying to wrap div ...
Cannot read property 'equals' of null when trying to wrap div elements in another ... The result is an error: node.js:270 Uncaught TypeError:...
Read more >
How to Prevent the Error: Cannot Read Property '0' of Undefined
A guide on how to prevent the error "cannot Read Property '0' of Undefined", covering techniques such as try, catch, using const over...
Read more >
Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError : Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found