Unfortunately I was not able to solve it.
I am not sure about earlier versions but I went over many possible suggestions, none of them worked...
Any additional idea that I can try?
An update...
i had to add two more dev dependencies under the web module.
sudo yarn add --dev babel-loader
sudo yarn add --dev @babel/preset-flow
now i am getting different error:
/react-native-web-monorepo/node_modules/@react-native-community/google-signin/src/GoogleSigninButton.js
Attempted import error: 'requireNativeComponent' is not exported from 'react-native'.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
thanks for the input
i am facing similar issue while using GoogleSigninButton from react-native-google-signin.
i tried adding require.resolve('@babel/plugin-proposal-class-properties') as you suggested below.
also tried to update babel.config.js with the following, didnt worked as well...
module.exports = {
plugins: [
[
'@babel/plugin-proposal-decorators',
{
legacy: true,
},
],
[
'@babel/plugin-proposal-class-properties',
{
loose: true,
},
],
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-transform-regenerator',
[
'@babel/plugin-transform-runtime',
{
helpers: false,
regenerator: true,
},
],
],
presets: ['@babel/preset-flow', 'module:metro-react-native-babel-preset'],
}
also tried with loose: true
require.resolve('@babel/plugin-proposal-class-properties', {
loose: true,
}),
any suggestion please?
thanks for you time.
Hi Oz, were you able to make it run? Did you try with a compatible release (any before 0.60)?
Hi Nishant,
Unfortunately I was not able to solve it.
I am not sure about earlier versions but I went over many possible suggestions, none of them worked...
Any additional idea that I can try?
Thanks for the reply
Use this config to fix the issue
Add the above code before the
return config
lineThanks Rajendran
i tried adding the above as part of config-overrides.js
it didn't helped.
BTW, i`ve executed 'sudo yarn add @react-native-community/google-signin'
Under the folder 'react-native-web-monorepo/packages/components'
Is that the right location?
Thanks, Oz
An update...
i had to add two more dev dependencies under the web module.
sudo yarn add --dev babel-loader
sudo yarn add --dev @babel/preset-flow
now i am getting different error:
/react-native-web-monorepo/node_modules/@react-native-community/google-signin/src/GoogleSigninButton.js
Attempted import error: 'requireNativeComponent' is not exported from 'react-native'.