Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when upgrading from v4 to v5 #1060

Closed
jaminhaber opened this issue May 1, 2020 · 5 comments
Closed

Error when upgrading from v4 to v5 #1060

jaminhaber opened this issue May 1, 2020 · 5 comments

Comments

@jaminhaber
Copy link

jaminhaber commented May 1, 2020

Hello!

Love this framework, but I'm having some trouble upgrading from v4 to v5.

💬 Question

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 = () => {

UI Kitten and Eva version

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
@artyorsh
Copy link
Collaborator

artyorsh commented May 2, 2020

Make sure to restart with clearing cache. For Expo apps you should use expo start -c Duplicates #1052 #996

@jaminhaber
Copy link
Author

@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.

@artyorsh
Copy link
Collaborator

artyorsh commented May 2, 2020

@jaminhaber please also check #996

@jaminhaber
Copy link
Author

@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;
};

@ghost
Copy link

ghost commented May 19, 2020

@jaminhaber Thank you for posting the custom webpack override. Very helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants