react-touch-ripple
react-touch-ripple copied to clipboard
babel version
Hello, I like your library but I got an error when using the library in a different project
. We use the @babel/runtime
in our project. But this library uses old babel imports.
I got this error when running the storybook.
Module not found: Error: Can't resolve 'babel-runtime/helpers/possibleConstructorReturn' in '/Users/melih/OUR_PROJECT/frontend/OUR_COMMON_LIBRARY/node_modules/react-touch-ripple/es'
Can you update the babel version? By the way, I don't know if there is a plugin for this, I searched but couldn't find it, I'm very new to FE. I'm a BE dev.
ping @froyog
hi @mberatsanli , I'm not sure the issue is related to the babel version of react-touch-ripple.
Are you using storybook as a boilerplate? What version of babel/runtime
and storybook do you have? Please provide more reproduction info so I can give a closer look on this.
Hi @froyog,
Are you using storybook as a boilerplate
Yeap, also I faced this error when deploying and starting as well
yarn start or yarn build
What version of babel/runtime and storybook do you have?
"@storybook/react: "^6.0.22"
"neutrino-preset-storybook-react": "^1.0.2",
"@babel/cli": "^7.12.10",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/runtime": "7.12.13",
"@babel/runtime-corejs3": "7.12.13"
I'm using the neutrinojs
for configuration.. For babel, storybook and webpack
Extra Notes:
-
i can solve this problem just by using "babel-runtime", but i don't want to use it, I couldn't find any solution on the internet.
-
When I change the
babel-runtime
import as@babel/runtime
. It works.
Hi @mberatsanli
Tried this on my local machine and the problem is caused by babel changing how babel-runtime
works in babel@7. So, I think for now, you can solve this problem by npm i -D babel-runtime
. I don't know why you don't want to use it since many react boilerplate (eg. create-react-app) are using babel-runtime and @babel/runtime at the same time. You can keep everything else in your project intact.
As for react-touch-ripple, I will upgrade babel version to babel 7 recently (a bit busy lately, so maybe next week). And a PR is always welcomed.
Hello @froyog , I'm not very familiar with the babel stuff so I want to write the project in a very clean way, I will add babel-runtime
temporarily, and open a PR for this library over the weekend