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.

Getting Error: TypeError: undefined is not an object (evaluating 'PermissionsIOS.requestPermission')

See original GitHub issue

I’m getting the above error from the iOS Simulator and VSCode is saying “Could not find a declaration file for module ‘react-native-qrcode-scanner’. ‘/Users/richoid/Code/PWR/PWR-V-RN/pwr-v-rn/node_modules/react-native-qrcode-scanner/index.js’ implicitly has an ‘any’ type. Try npm install @types/react-native-qrcode-scanner if it exists or add a new declaration (.d.ts) file containing declare module 'react-native-qrcode-scanner';ts(7016)”

This is using the sample code verbatim.

Latest version of react-native-qrcode-scanner. I tried updating react-native-camera but it didn’t fix it.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:23

github_iconTop GitHub Comments

10reactions
CGReinholdcommented, Mar 7, 2019

I had the same problem and noticed that this library uses the react-native-permissions in the version 1.1.1, while my project was using the version 2.

Downgrading the react-native-permissions version fixed the problem.

5reactions
dqhung311commented, Jan 3, 2019

Add this modules to Libraries in Xcode

screen shot 2019-01-03 at 15 18 21 screen shot 2019-01-03 at 15 20 03
Read more comments on GitHub >

github_iconTop Results From Across the Web

undefined is not an object (evaluating 'u.requestPermissions')
I am stuck at this point where i have imported FCM but still it says "undefined is not an object (evaluating 'u.requestPermissions')".
Read more >
react-native-permissions
An unified permissions API for React Native on iOS, Android and Windows. Latest version: 3.6.1, last published: 5 months ago.
Read more >
PermissionsAndroid
Prompts the user to enable multiple permissions in the same dialog and returns an object with the permissions as keys and strings as...
Read more >
undefined 不是对象(评估react native, Typeerror: undefined is not ...
React Native, TypeError: undefined is not an object When it is , TypeError: undefined is not an object (evaluating 'PermissionsIOS.requestPermission') #257 ...
Read more >
undefined is not an object (evaluating 'device.id') in ... - YouTube
ERROR TypeError : undefined is not an object ( evaluating 'device.id')Please do like share and comment if you like the video please do...
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