Results 1 to 2 of 2

Thread: issue to sharing componemt

  1. #1
    Sencha Premium User
    Join Date
    Jul 2014
    Posts
    42

    Default issue to sharing componemt

    hi all,

    I would like to separate two projects. One is common project to implement common component to use. The second one is main project to use common component to develop.

    I use npm link path:commonproject to connect common project to main project so that I can use the common component in main project.

    However, I found the following issue:
    Code:
    ExtJSComponent.js:977 Uncaught TypeError: Cannot read property 'insert' of undefined
         at  Object.../../cmis-app-client-common/node_modules/@extjs/reactor/dist/ExtJSComponent.js._ReactComponentEnvironment2.default.replaceNodeWithMarkup  (ExtJSComponent.js:977)
        at ReactCompositeComponentWrapper._replaceNodeWithMarkup (ReactCompositeComponent.js:781)
        at ReactCompositeComponentWrapper._updateRenderedComponent (ReactCompositeComponent.js:771)
        at ReactCompositeComponentWrapper._performComponentUpdate (ReactCompositeComponent.js:721)
        at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:642)
        at ReactCompositeComponentWrapper.receiveComponent (ReactCompositeComponent.js:544)
        at Object.receiveComponent (ReactReconciler.js:122)
        at ReactCompositeComponentWrapper._updateRenderedComponent (ReactCompositeComponent.js:751)
        at ReactCompositeComponentWrapper._performComponentUpdate (ReactCompositeComponent.js:721)
    at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:642)
    I found that if common and main project used <Container> …</Container>, the issue will be shown

    May I have any advice to solve this issue?

  2. #2
    Sencha User
    Join Date
    Sep 2017
    Posts
    4
    Answers
    1

    Default

    I have been trying to do something similar for a while. I started using npm successfully and I never saw an error like that but I am getting to a point where npm link is not enough since it may not be the best approach in a Continuous Integration environment or a Docker container.

    Almost a year ago Mark Brocato shared an example on how to create libraries: https://github.com/markbrocato/ext-react-library-example

Similar Threads

  1. [4.2.0 RC] Issue if sharing menu for buttons
    By Daniil in forum Ext:Bugs
    Replies: 4
    Last Post: 19 Sep 2017, 6:44 PM
  2. Sharing a starter app
    By steenole in forum Sencha Cmd
    Replies: 2
    Last Post: 11 Oct 2015, 11:57 PM
  3. Replies: 2
    Last Post: 3 Sep 2014, 7:35 AM
  4. Replies: 3
    Last Post: 1 Mar 2012, 9:14 AM
  5. TabPanels sharing the same DIV
    By fmartinezl in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 5 Mar 2008, 10:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •