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.

Nativescript 3.4.0 Webpack giving a 'Cannot read property 'init' of undefined' error.

See original GitHub issue

I am trying the plugin on nativescript 3.4.0 angular and when i am using webpack i am getting the following error:

JS: ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'init' of undefined JS: TypeError: Cannot read property 'init' of undefined

which is related to this portion of the plugin code: function SecureStorage() { this.hawk = com.orhanobut.hawk.Hawk.init(utils.ad.getApplicationContext()).build(); }

What could be the issue here?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jacopo69commented, Feb 7, 2018

I had the same problem. After uninstalling the app on device, removing the platform (tns platform remove android) and readding the platform (tns platform add android) I solved.

1reaction
EddyVerbruggencommented, May 18, 2018

That’s true for all plugins wrapping native libraries.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property '0' of undefined after upgrade: Angular ...
I actually made it working, the problem seems to be related to the versions of angular, nativescript and webpack used.
Read more >
cannot read properties of undefined jasmine - You.com
If you're calling it in the ngOnInit , you need to mock the returnValue before the first ... Jasmine angular unit test 'Cannot...
Read more >
Gatsby Changelog | 5.3.0
Common errors when doing swap to LMDB will be that some fields don't exist anymore or are null / undefined when trying to...
Read more >
Cannot read property 'init' of undefined when ... - Kinvey support
Hello, I'm new to Kinvey and some sort of newbie also with Nativescript, ... Cannot read property 'init' of undefined when initializing Kinvey...
Read more >
@nativescript/core | Yarn - Package Manager
NativeScript empowers you to access native APIs from JavaScript directly. Currently iOS and Android runtimes are provided for rich mobile development across ...
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