NathanaelA / nativescript-permissions

Wraps up the entire Android 6 permissions system in a easy to use plugin.
MIT License
46 stars 22 forks source link

Compile Time Error for 1.3.12 #48

Closed SingleMalted closed 2 years ago

SingleMalted commented 2 years ago

Hey Nathanael,

Our CI patched this plugin and failed during build. Rolling back to 1.3.11 fixed the issue.

Error code:

ERROR in ../node_modules/@master.technology/permissions/permissions.js 67:46
Module parse failed: Unexpected token (67:46)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|                     // We will get a Status=0 before we get the first real status...
|                     if (status === 0) { return; }
>                     const owner = this._owner?.get();
|                     if (owner) {
|                         if (LOCATION.has()) {
 @ ../node_modules/nativescript-permissions/permissions.js 13:17-58

Thanks

NathanaelA commented 2 years ago

Ugh, ?. is supported by all the NS engines, so why the toolchain is having issues with it, is anyone's guess. Thanks, I'll down grade the JS code to use the obsolete older methods.

NathanaelA commented 2 years ago

I've pushed a v2.01 that uses the older const owner = this._owner && this._owner.get() rather than the more modern ?. syntax. Thanks for letting me know...

SingleMalted commented 2 years ago

That was the issue, optional chaining syntax? That's weird.😕

Oh well, thanks for fixing... working fine now.