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 find name 'CLAuthorizationStatus'

See original GitHub issue

Full error message

node_modules/nativescript-geolocation/location-monitor.d.ts(112,48): error TS2304: Cannot find name 'CLAuthorizationStatus'. TypeScript compiler failed with exit code 1

Which platform(s) does your issue occur on?

  • only have Android emulator that tns configured automatically

Please, provide the following version numbers that your issue occurs with:

  • CLI: 5.1.1
  • Cross-platform modules: 5.1.2
  • Runtime(s): tns-android & tns-ios= 5.1.0
  • Plugin(s):
    “dependencies”: { “nativescript-geolocation”: “^4.4.0”, “nativescript-theme-core”: “~1.0.4”, “tns-core-modules”: “~5.1.0” }, “devDependencies”: { “nativescript-dev-sass”: “~1.6.0”, “nativescript-dev-typescript”: “~0.7.0”, “nativescript-dev-webpack”: “~0.19.0”, “tslint”: “~5.11.0” }

Please, tell us how to recreate the issue in as much detail as possible.

Error appears when doing tns run android but the project continues to run.

Is there any code involved?

Tried to to import only what’s needed which is getCurrentLocation rather than import * as geolocation from "nativescript-geolocation"; but it still displays the error.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
mikkeldammcommented, Jan 26, 2019

Until the type is added and the issue is fixed, then you can add the following to your references.d.ts:

declare type CLAuthorizationStatus = void;

The reason i’m choosing void is because I don’t know the actual type 🙈

1reaction
tbozhikovcommented, Jan 29, 2019

Found the issue, ignore the previous comment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swift CLAuthorizationStatus.AlwaysAuthorized is not defined
The documentation seems to say that kCLAuthorizationStatusAuthorizedAlways should be an acceptable return from CLLocationManager.
Read more >
CLAuthorizationStatus | Apple Developer Documentation
A message that tells the user why the app is requesting access to the user's location at all times. Name: Privacy - Location...
Read more >
Get User Location In Swift With CLLocationManager
Learn how to request location permissions, get updates on a user's location, and check location permissions in Swift.
Read more >
Requesting location: Core Location - Hacking with Swift
Your browser can't play this video. ... For example, if you're creating a map app that shows users how to get from their...
Read more >
A better way to ask for a one-time user's location with ... - Sarunw
The current authorization request dialog doesn't design for this kind of permission, and "Allow Once" is just a name for "Decided Later".
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