elegantthemes / create-divi-extension

MIT License
185 stars 58 forks source link

Integrating a ReactJs component in a wordpress with Divi project #406

Open frankenState opened 4 years ago

frankenState commented 4 years ago

Problem Description

I am developing a project using ReactJs and Wordpress with a Divi Theme. Everytime I create a divi extension using the instructions written in here (https://www.elegantthemes.com/documentation/developers/create-divi-extension/) I end up getting a problem when a execute yarn start

Failed to compile.

./node_modules/react-transition-group/esm/TransitionGroup.js
Module not found: Can't resolve '@babel/runtime/helpers/esm/assertThisInitialized' in 'DIRECTORY'

Steps To Reproduce

  1. Followed the instructions in here (https://www.elegantthemes.com/documentation/developers/create-divi-extension/)
    • I have yarn version 1.22.4, NPM 6.14.4, and Node v12.13.0
  2. installed the following libraries using yarn
    yarn add axios bootstrap react-bootstrap react-element-spinner react-iframe react-recaptcha-v3 react-toastify 
    recharts
  3. I copied the component (a stateless component) from my separate ReactJs project (installed using npx create-react app project-name) that I used to develop the components and pasted it on the newly created divi extension, under the modules folder.
  4. Ran the yarn start then the error shows up.

    Screenshot and/or gif

    p80 - Copy

code-with-mehedi commented 3 years ago

Hello there, The answer is in your error. The module is missing make sure that you have included it properly. Thanks