You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm run build
> build
> react-app-rewired build
Creating an optimized production build...
Failed to compile.
Module not found: Error: Can't resolve '../../../../../components/common/Form/RadioInput' in '/app/code/Hyva/CheckoutExample/reactapp/src/paymentMethods/braintree/src/components/BraintreeApplePay'
@dangtrinhtran Thank you for asking this question. I am answering your questions below:
However, changing the code in paymentMethods/braintree is not a good solution because it will be overridden when I run npm install.
You are wrong here. Once you have paymentMethods/braintree present in your reactapp, any further npm install do not overwrite your modifications. This is how you are supposed to modify the braintree payment method as well. It is totally fine and intended to modify in this way.
If you have time, can you please create a PR to braintree repository with the changes you mentioned above. This will help others to have a smooth payment integration in the future.
Hello,
Preconditions (*)
hyva-themes/magento2-default-theme
-> 1.2hyva-themes/magento2-react-checkout
-> 1.1.2 (installed via Composer)hyva-themes/magento2-checkout-example
-> the latest versionnode v16.15.1
andnpm v8.11.0
Steps to reproduce (*)
hyva-themes/magento2-react-checkout
via Composerapp/code/Hyva/CheckoutExample
cd app/code/Hyva/CheckoutExample/reactapp
npm install braintree-web
app/code/Hyva/CheckoutExample/reactapp/package.json
npm install
npm run build
Actual result (*)
Following this guide https://github.com/hyva-themes/magento2-checkout-example#payment-integrations, I have changed
../../../../..
to@hyva/react-checkout
inapp/code/Hyva/CheckoutExample/reactapp/src/paymentMethods/braintree
folder, and then it worked.hyva-themes/magento2-hyva-checkout-braintree/blob/main/src/components/BraintreeApplePay/ApplePay.jsx
However, changing the code in
paymentMethods/braintree
is not a good solution because it will be overridden when I runnpm install
.Do we have any solution to solve that?
Thank you.
The text was updated successfully, but these errors were encountered: