Reputation: 255
Suddenly this buffer
problem came up within our project. It's quite strange from where it comes...
console.error: "This browser lacks typed array (Uint8Array) support which is required by buffer
v5.x. Use buffer
v4.x if you require old browser support."
console.error: "This browser lacks typed array (Uint8Array)
support which is required by `buffer` v5.x.
Use `buffer` v4.x if you require old browser support."
<unknown>
index.js:41:4
loadModuleImplementation
require.js:321:6
guardedLoadModule
require.js:207:36
metroRequire
require.js:127:24
<unknown>
scclientsocket.js:9:20
loadModuleImplementation
require.js:321:6
guardedLoadModule
require.js:207:36
metroRequire
require.js:127:24
<unknown>
index.js:1:28
loadModuleImplementation
require.js:321:6
guardedLoadModule
require.js:207:36
metroRequire
require.js:127:24
<unknown>
devTools.js:15:34
loadModuleImplementation
require.js:321:6
guardedLoadModule
require.js:207:36
metroRequire
require.js:127:24
<unknown>
index.js:6:23
loadModuleImplementation
require.js:321:6
guardedLoadModule
require.js:207:36
metroRequire
require.js:127:24
<unknown>
store.js:10
loadModuleImplementation
require.js:321:6
guardedLoadModule
require.js:207:36
metroRequire
require.js:127:24
<unknown>
HomeScreen.js:9
loadModuleImplementation
require.js:321:6
guardedLoadModule
require.js:207:36
metroRequire
require.js:127:24
<unknown>
index.js:3
loadModuleImplementation
require.js:321:6
guardedLoadModule
require.js:199:45
metroRequire
require.js:127:24
global code
$ react-native info
React Native Environment Info:
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
Memory: 30.05 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.3 - /usr/local/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 28
Build Tools: 28.0.3
System Images: android-28 | Google APIs Intel x86 Atom_64
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.58.6 => 0.58.6
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Changing to older git branches and version keep giving this issue on emulators and physical devices. We included different buffer versions.
yarn add [email protected]
rm -rf node_modules && rm yarn.lock && yarn
within branches that worked before.Upvotes: 5
Views: 3155
Reputation: 255
It was required to upgrade react-native to a more recent version. Then this error disappeared.
Upvotes: 0
Reputation: 1
Check the version installed before changing to new
Try to install the buffer
version 4.
You can use the following command:
npm install buffer@4 --save
Upvotes: 0
Reputation: 181
I don't know if it will be very useful for you but I got the same problem and the only way to have my work environment ready was by starting the Remote JS debugging.
Upvotes: 1