How to install new modules after setup?
See original GitHub issueFirst of all thank you for your work! I followed your āgetting startedā guide and worked perfectly, but now Iām having quite a big issue on almost all new libraries I want to addā¦ Iām writing the application in React Native and having it transformed for web too and it works well until I install a library (For example the Bottom sheet you recommend).
I install the new library, launch my application using react-app-rewired start
and then, even if flow plugin, preset-env etc. are there I get errors like this one:
.../workspace/Name/node_modules/react-native-gesture-handler/DrawerLayout.js: Support for the experimental syntax 'flow' isn't currently enabled (30:8):
which suggests webpack isnāt setup correctly; I then noticed in the config-overrides.js
that you want babel presets/plugins only to be ran on react-native-vector-icons
and react-native-safe-area-view
modules.
To be clear (as described here):
....
test: /\.js$/,
exclude: /node_modules[/\\](?!react-native-vector-icons|react-native-safe-area-view)/,
...
Whenever I add my new library there, I then get another compilation error:
./node_modules/react-native-gesture-handler/GestureButtons.js 244:65
Module parse failed: Unexpected token (244:65)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| rest = _objectWithoutProperties(_this$props2, ["children", "style"]);
|
> const resolvedStyle = _reactNative.StyleSheet.flatten(style ?? {});
|
| return /*#__PURE__*/_react.default.createElement(BaseButton, _extends({}, rest, {
react: 16.13.1 react-native: 0.63.2 react-native-paper: 4.0.1 react-native-vector-icons: 7.0.0
Any suggestion? Thank you very much and sorry if itās a noob question
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
@RichardLindhout React Navigation Works SURPRISINGLY well on react native web, animation, url and everything. I was very surprised on how well it works.
Hello š, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.