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.

referenceError: Can't find variable: Buffer

See original GitHub issue

react-native: 0.59.10 react-native-qrcode-svg: 5.3.1 react-native-svg: 9.13.3

render show this error QQ图片20191105160657

just create a new project install react-native-svg and react-native-qrcode-svg

the App.js as

...
import QRCode from 'react-native-qrcode-svg';
...

  render() {
    return (
      <View>
        <QRCode value="https://www.baidu.com" />
      </View>
    );
  }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
tuvs85commented, Nov 5, 2019

+1 react-native: 0.59.5 react-native-qrcode-svg: 5.1.1 react-native-svg: 9.11.1

1reaction
M45tercommented, Dec 2, 2019

@awesomejerry I find something in react-native-qrcode-svg src/index.js

...
import Svg, {
  ...
} from 'react-native-svg'
...

modify to

...
import {
  Svg, 
  ...
} from 'react-native-svg'
...

it works well, Ithink this may a compile bug with react-native or bable libs in the problem project

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't find variable: Buffer - node.js - Stack Overflow
Right now I'm running into a Can't find variable: Buffer which is being thrown in a util folder in the standard library.
Read more >
Can't find variable:Buffer · Issue #14796 · facebook/react-native
When I deploy my app, I get this error: Can't find variable: Buffer.
Read more >
ReferenceError: Can't find variable: Buffer - AppGyver forums
I have read the feed about “ReferenceError: Can't find variable: Buffer” but it isn't helping because it is currently working on the online ......
Read more >
[Solved]-Cant find variable buffer-React Native - appsloveworld
Coding example for the question Cant find variable buffer-React Native. ... ReferenceError : Can't find variable React - React Navigation · react-native: ...
Read more >
Can't find variable: Buffer (React Native App) - Losant Forums
I am trying to use losant-mqtt JS from within a React Native mobile application. For this, I used the repository available at GitHub: ......
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