Hello!
Love this framework, but I'm having some trouble upgrading from v4 to v5.
After running
yarn add @ui-kitten/components@next @eva-design/eva@next
and
yarn web
I am met with the following error:
/Users/me/Programming/mantra/expo/node_modules/@ui-kitten/components/ui/input/input.component.js 104:38
Module parse failed: Unexpected token (104:38)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| this.webEventResponder = devsupport_1.WebEventResponder.create(this);
| this.focus = () => {
> this.textInputRef.current?.focus();
| };
| this.blur = () => {
| Package | Version |
| ----------- | ----------- |
| @eva-design/eva | 2.0.0-alpha.1 |
| @ui-kitten/components | ^5.0.0-alpha.1 |
| expo | ~37.0.3 |
| react | ~16.9.0 |
| react-native | ~0.61.5 |
|typescript|~3.8.3|
|react-native-svg|^12.1.0|
Make sure to restart with clearing cache. For Expo apps you should use expo start -c Duplicates ~#1052~ #996
@artyorsh
Thank you for replying. Unfortunately i don't believe this is the same issue as the error is different and the recommended solution did not fix it. I can provide more information if needed.
@jaminhaber please also check #996
@artyorsh thank you. I had to modify my webpack configuration like so.
const createExpoWebpackConfigAsync = require("@expo/webpack-config");
module.exports = async function (env, argv) {
const config = await createExpoWebpackConfigAsync(
{
...env,
optimization: {
...env.optimization,
minimize: false,
},
babel: {
dangerouslyAddModulePathsToTranspile: ["@ui-kitten/components"],
},
},
argv
);
return config;
};
@jaminhaber Thank you for posting the custom webpack override. Very helpful!
Most helpful comment
@artyorsh thank you. I had to modify my webpack configuration like so.